ixfx
    Preparing search index...

    Function isEqualValuePartial

    • Returns true if a contains the values of b. a may contain other values, but we only check against what is in b. a and b must both be simple objects.

      const obj = {
      name: `Elle`,
      size: 100,
      colour: {
      red: 0.5,
      green: 0.1,
      blue: 0.2
      }
      }

      isEqualValuePartial(obj, { name: `Elle` }); // true
      isEqualValuePartial(obj, { name: { colour: red: { 0.5, green: 0.1 }} }); // true

      isEqualValuePartial(obj, { name: `Ellen` }); // false
      isEqualValuePartial(obj, { lastname: `Elle` }); // false

      Type Parameters

      • T1extendsRecord<string, any>
      • T2extendsRecord<string, any>

      Parameters

      Returns boolean