@thi.ng/equiv
Advanced tools
Comparing version 0.1.13 to 0.1.14
@@ -6,2 +6,10 @@ # Change Log | ||
## [0.1.14](https://github.com/thi-ng/umbrella/compare/@thi.ng/equiv@0.1.13...@thi.ng/equiv@0.1.14) (2018-12-08) | ||
**Note:** Version bump only for package @thi.ng/equiv | ||
## [0.1.13](https://github.com/thi-ng/umbrella/compare/@thi.ng/equiv@0.1.12...@thi.ng/equiv@0.1.13) (2018-10-21) | ||
@@ -8,0 +16,0 @@ |
12
index.js
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const OBJP = Object.getPrototypeOf({}); | ||
const FN = "function"; | ||
const STR = "string"; | ||
exports.equiv = (a, b) => { | ||
@@ -10,3 +12,3 @@ let proto; | ||
if (a != null) { | ||
if (typeof a.equiv === "function") { | ||
if (typeof a.equiv === FN) { | ||
return a.equiv(b); | ||
@@ -19,3 +21,3 @@ } | ||
if (b != null) { | ||
if (typeof b.equiv === "function") { | ||
if (typeof b.equiv === FN) { | ||
return b.equiv(a); | ||
@@ -27,3 +29,3 @@ } | ||
} | ||
if (typeof a === "string" || typeof b === "string") { | ||
if (typeof a === STR || typeof b === STR) { | ||
return false; | ||
@@ -35,4 +37,4 @@ } | ||
} | ||
if (typeof a !== "function" && a.length !== undefined && | ||
typeof b !== "function" && b.length !== undefined) { | ||
if (typeof a !== FN && a.length !== undefined && | ||
typeof b !== FN && b.length !== undefined) { | ||
return exports.equivArrayLike(a, b); | ||
@@ -39,0 +41,0 @@ } |
{ | ||
"name": "@thi.ng/equiv", | ||
"version": "0.1.13", | ||
"version": "0.1.14", | ||
"description": "Extensible deep equivalence checking for any data types", | ||
@@ -40,3 +40,3 @@ "main": "./index.js", | ||
}, | ||
"gitHead": "5bb513915cb3c533bd4278f6f365389b3664f4d1" | ||
"gitHead": "6e361d62fff19dbda467c13f375b0ebcb5d6d8a2" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23224
180