PATH:
usr
/
local
/
lib
/
node_modules
/
gulp
/
node_modules
/
es5-ext
/
object
"use strict"; var strCompare = require("../string/#/case-insensitive-compare") , isObject = require("./is-object") , isValue = require("./is-value") , numIsNaN = require("../number/is-nan") , resolve , typeMap; typeMap = { undefined: 0, object: 1, boolean: 2, string: 3, number: 4 }; resolve = function (a) { if (isObject(a)) { if (typeof a.valueOf !== "function") return NaN; a = a.valueOf(); if (isObject(a)) { if (typeof a.toString !== "function") return NaN; a = a.toString(); if (typeof a !== "string") return NaN; } } return a; }; module.exports = function (val1, val2) { if (val1 === val2) return 0; // Same val1 = resolve(val1); val2 = resolve(val2); // eslint-disable-next-line eqeqeq if (val1 == val2) return typeMap[typeof val1] - typeMap[typeof val2]; if (!isValue(val1)) return -1; if (!isValue(val2)) return 1; if (typeof val1 === "string" || typeof val2 === "string") { return strCompare.call(val1, val2); } if (numIsNaN(val1) && numIsNaN(val2)) return 0; // Jslint: ignore return Number(val1) - Number(val2); };
[-] is-callable.js
[edit]
[-] compact.js
[edit]
[-] copy-deep.js
[edit]
[-] first-key.js
[edit]
[-] ensure-finite-number.js
[edit]
[-] find.js
[edit]
[-] validate-stringifiable-value.js
[edit]
[-] validate-array-like.js
[edit]
[-] validate-array-like-object.js
[edit]
[-] ensure-natural-number.js
[edit]
[-] ensure-promise.js
[edit]
[-] mixin-prototypes.js
[edit]
[-] map-keys.js
[edit]
[-] is-array-like.js
[edit]
[-] is-value.js
[edit]
[-] is-integer.js
[edit]
[-] copy.js
[edit]
[-] is-empty.js
[edit]
[-] is.js
[edit]
[+]
..
[+]
keys
[-] some.js
[edit]
[-] key-of.js
[edit]
[-] find-key.js
[edit]
[+]
assign
[-] is-promise.js
[edit]
[-] is-copy-deep.js
[edit]
[-] validate-stringifiable.js
[edit]
[-] flatten.js
[edit]
[-] is-object.js
[edit]
[-] unserialize.js
[edit]
[-] ensure-thenable.js
[edit]
[-] valid-value.js
[edit]
[-] eq.js
[edit]
[-] valid-object.js
[edit]
[+]
entries
[-] is-plain-function.js
[edit]
[-] get-property-names.js
[edit]
[-] ensure-plain-object.js
[edit]
[-] assign-deep.js
[edit]
[-] ensure-natural-number-value.js
[edit]
[-] is-plain-object.js
[edit]
[-] is-thenable.js
[edit]
[-] count.js
[edit]
[-] index.js
[edit]
[-] to-array.js
[edit]
[-] _iterate.js
[edit]
[-] primitive-set.js
[edit]
[-] compare.js
[edit]
[-] is-finite-number.js
[edit]
[-] map.js
[edit]
[-] filter.js
[edit]
[-] every.js
[edit]
[-] ensure-plain-function.js
[edit]
[-] safe-traverse.js
[edit]
[-] create.js
[edit]
[-] is-copy.js
[edit]
[-] is-natural-number-value.js
[edit]
[-] clear.js
[edit]
[-] ensure-array.js
[edit]
[-] is-natural-number.js
[edit]
[-] valid-callable.js
[edit]
[-] for-each.js
[edit]
[+]
set-prototype-of
[-] normalize-options.js
[edit]
[-] serialize.js
[edit]
[-] is-number-value.js
[edit]
[-] mixin.js
[edit]
[-] ensure-integer.js
[edit]