swc/bundler/tests/.cache/deno/7ce870403c4d6de06afba28d120adead7c745740.ts
강동윤 bbaf619f63
fix(bundler): Fix bugs (#1437)
swc_bundler:
 - [x] Fix wrapped esms. (denoland/deno#9307)
 - [x] Make test secure.
2021-03-02 17:33:03 +09:00

17 lines
490 B
TypeScript

// Loaded from https://deno.land/x/ramda@v0.27.2/source/internal/_objectIs.js
// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
function _objectIs(a, b) {
// SameValue algorithm
if (a === b) { // Steps 1-5, 7-10
// Steps 6.b-6.e: +0 != -0
return a !== 0 || 1 / a === 1 / b;
} else {
// Step 6.a: NaN == NaN
return a !== a && b !== b;
}
}
export default typeof Object.is === 'function' ? Object.is : _objectIs;