Options
All
  • Public
  • Public/Protected
  • All
Menu

Module object/eqProps

Index

References

Functions

References

Renames and re-exports eqProps

Functions

  • eqProps<K>(prop: K, obj1: Record<any, any>, obj2: Record<any, any>): boolean
  • eqProps<K>(prop: K, obj1: Record<any, any>): (obj2: Record<any, any>) => boolean
  • eqProps<K>(prop: K): CurriedFunction2<Record<any, any>, Record<any, any>, boolean>
  • Reports whether two objects have the same value, in equal terms, for the specified property. Useful as a curried predicate.

    example
     var o1 = { a: 1, b: 2, c: 3, d: 4 };
    var o2 = { a: 10, b: 20, c: 3, d: 40 };
    eqProps('a', o1, o2); //=> false
    eqProps('c', o1, o2); //=> true

    Type parameters

    • K: string | number | symbol

    Parameters

    • prop: K

      The name of the property to compare

    • obj1: Record<any, any>
    • obj2: Record<any, any>

    Returns boolean

  • Reports whether two objects have the same value, in equal terms, for the specified property. Useful as a curried predicate.

    example
     var o1 = { a: 1, b: 2, c: 3, d: 4 };
    var o2 = { a: 10, b: 20, c: 3, d: 40 };
    eqProps('a', o1, o2); //=> false
    eqProps('c', o1, o2); //=> true

    Type parameters

    • K: string | number | symbol

    Parameters

    • prop: K

      The name of the property to compare

    • obj1: Record<any, any>

    Returns (obj2: Record<any, any>) => boolean

      • (obj2: Record<any, any>): boolean
      • Parameters

        • obj2: Record<any, any>

        Returns boolean

  • Reports whether two objects have the same value, in equal terms, for the specified property. Useful as a curried predicate.

    example
     var o1 = { a: 1, b: 2, c: 3, d: 4 };
    var o2 = { a: 10, b: 20, c: 3, d: 40 };
    eqProps('a', o1, o2); //=> false
    eqProps('c', o1, o2); //=> true

    Type parameters

    • K: string | number | symbol

    Parameters

    • prop: K

      The name of the property to compare

    Returns CurriedFunction2<Record<any, any>, Record<any, any>, boolean>

Generated using TypeDoc