Sha256: bb72d681641baa3ffdb795afcb2a8ea799711efbcf7d1f0fc45d843d63ce8ba2

Contents?: true

Size: 795 Bytes

Versions: 3

Compression:

Stored size: 795 Bytes

Contents

{"version":3,"names":["shallowEqual","actual","expected","keys","Object","key"],"sources":["../../src/utils/shallowEqual.ts"],"sourcesContent":["export default function shallowEqual<T extends object>(\n  actual: object,\n  expected: T,\n): actual is T {\n  const keys = Object.keys(expected) as (keyof T)[];\n\n  for (const key of keys) {\n    if (\n      // @ts-expect-error maybe we should check whether key exists first\n      actual[key] !== expected[key]\n    ) {\n      return false;\n    }\n  }\n\n  return true;\n}\n"],"mappings":";;;;;;AAAe,SAASA,YAAYA,CAClCC,MAAc,EACdC,QAAW,EACE;EACb,MAAMC,IAAI,GAAGC,MAAM,CAACD,IAAI,CAACD,QAAQ,CAAgB;EAEjD,KAAK,MAAMG,GAAG,IAAIF,IAAI,EAAE;IACtB,IAEEF,MAAM,CAACI,GAAG,CAAC,KAAKH,QAAQ,CAACG,GAAG,CAAC,EAC7B;MACA,OAAO,KAAK;IACd;EACF;EAEA,OAAO,IAAI;AACb"}

Version data entries

3 entries across 1 versions & 1 rubygems

Version Path
trusty-cms-6.3.1 node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/utils/shallowEqual.js.map
trusty-cms-6.3.1 node_modules/@babel/traverse/node_modules/@babel/types/lib/utils/shallowEqual.js.map
trusty-cms-6.3.1 node_modules/@babel/types/lib/utils/shallowEqual.js.map