Options
All
  • Public
  • Public/Protected
  • All
Menu

Module isMatch

Index

References

Functions Lang

References

Renames and re-exports isMatch

Lang Functions

  • isMatch<T>(object: T, source: Partial<T>): boolean
  • Performs a partial deep comparison between object and source to determine if object contains equivalent property values.

    Note: This method is equivalent to matches when source is partially applied.

    Partial comparisons will match empty array and empty object source values against any array or object value, respectively. See isEqual for a list of supported value comparisons.

    since

    5.7.0

    example
    const object = { 'a': 1, 'b': 2 }

    isMatch(object, { 'b': 2 })
    // => true

    isMatch(object, { 'b': 1 })
    // => false

    Type parameters

    • T

    Parameters

    • object: T

      The object to inspect.

    • source: Partial<T>

      The object of property values to match.

    Returns boolean

    Returns true if object is a match, else false.