Sha256: aba932f795f99273f58f5a7813dcf06a5314cda486eda0a300ea1bdca5fe4683

Contents?: true

Size: 811 Bytes

Versions: 161

Compression:

Stored size: 811 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","ignoreList":[]}

Version data entries

161 entries across 15 versions & 2 rubygems

Version Path
immosquare-cleaner-0.1.49 node_modules/@babel/helper-builder-binary-assignment-operator-visitor/node_modules/@babel/types/lib/utils/shallowEqual.js.map
immosquare-cleaner-0.1.49 node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/node_modules/@babel/traverse/node_modules/@babel/types/lib/utils/shallowEqual.js.map
immosquare-cleaner-0.1.49 node_modules/@babel/plugin-transform-async-generator-functions/node_modules/@babel/traverse/node_modules/@babel/types/lib/utils/shallowEqual.js.map
immosquare-cleaner-0.1.49 node_modules/@babel/helpers/node_modules/@babel/types/lib/utils/shallowEqual.js.map
immosquare-cleaner-0.1.49 node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types/lib/utils/shallowEqual.js.map
immosquare-cleaner-0.1.49 node_modules/@babel/helper-wrap-function/node_modules/@babel/types/lib/utils/shallowEqual.js.map
immosquare-cleaner-0.1.49 node_modules/@babel/helper-environment-visitor/node_modules/@babel/types/lib/utils/shallowEqual.js.map
immosquare-cleaner-0.1.49 node_modules/@babel/plugin-transform-classes/node_modules/@babel/helper-replace-supers/node_modules/@babel/helper-member-expression-to-functions/node_modules/@babel/types/lib/utils/shallowEqual.js.map
immosquare-cleaner-0.1.49 node_modules/@babel/types/lib/utils/shallowEqual.js.map
immosquare-cleaner-0.1.49 node_modules/jscodeshift/node_modules/@babel/core/node_modules/@babel/types/lib/utils/shallowEqual.js.map
immosquare-cleaner-0.1.49 node_modules/@babel/helper-remap-async-to-generator/node_modules/@babel/traverse/node_modules/@babel/types/lib/utils/shallowEqual.js.map
immosquare-cleaner-0.1.49 node_modules/@babel/helper-simple-access/node_modules/@babel/types/lib/utils/shallowEqual.js.map
immosquare-cleaner-0.1.49 node_modules/@babel/preset-modules/node_modules/@babel/types/lib/utils/shallowEqual.js.map
immosquare-cleaner-0.1.49 node_modules/@babel/helper-optimise-call-expression/node_modules/@babel/types/lib/utils/shallowEqual.js.map
immosquare-cleaner-0.1.49 node_modules/@babel/plugin-transform-classes/node_modules/@babel/traverse/node_modules/@babel/types/lib/utils/shallowEqual.js.map
immosquare-cleaner-0.1.49 node_modules/@babel/plugin-transform-object-super/node_modules/@babel/helper-replace-supers/node_modules/@babel/traverse/node_modules/@babel/types/lib/utils/shallowEqual.js.map
immosquare-cleaner-0.1.49 node_modules/@babel/helper-function-name/node_modules/@babel/types/lib/utils/shallowEqual.js.map
immosquare-cleaner-0.1.49 node_modules/@babel/helper-module-imports/node_modules/@babel/types/lib/utils/shallowEqual.js.map
immosquare-cleaner-0.1.49 node_modules/@babel/helper-skip-transparent-expression-wrappers/node_modules/@babel/types/lib/utils/shallowEqual.js.map
immosquare-cleaner-0.1.49 node_modules/@babel/helper-annotate-as-pure/node_modules/@babel/types/lib/utils/shallowEqual.js.map