Comparing version 1.0.3 to 2.0.0
{ | ||
"extends": "eslint-config-es/2015/server" | ||
"extends": "es/2015/server" | ||
} |
'use strict'; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
var isSubsetOf = require('is-subset-of'), | ||
Type = require('typedescriptor'); | ||
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray")); | ||
var unbox = require('./unbox'); | ||
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof")); | ||
var compare = { | ||
equal: function equal(left, right) { | ||
var leftType = Type.of(left), | ||
rightType = Type.of(right); | ||
var alias = { | ||
eq: 'equal', | ||
ne: 'notEqual', | ||
gt: 'greaterThan', | ||
ge: 'greaterThanOrEqual', | ||
lt: 'lessThan', | ||
le: 'lessThanOrEqual', | ||
id: 'identical', | ||
eqs: 'equalByStructure', | ||
nes: 'notEqualByStructure', | ||
gts: 'greaterThanByStructure', | ||
ges: 'greaterThanOrEqualByStructure', | ||
lts: 'lessThanByStructure', | ||
les: 'lessThanOrEqualByStructure' | ||
}; | ||
var cmp; | ||
var isSubset = function isSubset(potentialSubset, superset) { | ||
var visited = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; | ||
if ((0, _typeof2.default)(potentialSubset) !== 'object') { | ||
throw new Error('Potential subset must be an object.'); | ||
} | ||
if ((0, _typeof2.default)(superset) !== 'object') { | ||
throw new Error('Superset must be an object.'); | ||
} | ||
if (potentialSubset === null && superset !== null || potentialSubset !== null && superset === null) { | ||
return false; | ||
} | ||
if (potentialSubset === null && superset === null) { | ||
return true; | ||
} | ||
if (Array.isArray(potentialSubset) && !Array.isArray(superset) || !Array.isArray(potentialSubset) && Array.isArray(superset)) { | ||
return false; | ||
} | ||
if (Array.isArray(potentialSubset) && Array.isArray(superset)) { | ||
if (potentialSubset.length > superset.length) { | ||
return false; | ||
} | ||
var _iteratorNormalCompletion = true; | ||
var _didIteratorError = false; | ||
var _iteratorError = undefined; | ||
try { | ||
var _loop = function _loop() { | ||
var item = _step.value; | ||
if ((0, _typeof2.default)(item) === 'object') { | ||
if (visited.includes(item)) { | ||
return "continue"; | ||
} | ||
visited.push(item); | ||
/* eslint-disable no-loop-func */ | ||
var _supersetHasItem = superset.some(function (superItem) { | ||
return cmp.eq(item, superItem); | ||
}); | ||
/* eslint-enable no-loop-func */ | ||
if (!_supersetHasItem) { | ||
return { | ||
v: false | ||
}; | ||
} | ||
return "continue"; | ||
} | ||
/* eslint-disable no-loop-func */ | ||
var supersetHasItem = superset.some(function (superItem) { | ||
return cmp.eq(item, superItem); | ||
}); | ||
/* eslint-enable no-loop-func */ | ||
if (!supersetHasItem) { | ||
return { | ||
v: false | ||
}; | ||
} | ||
}; | ||
for (var _iterator = potentialSubset[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { | ||
var _ret = _loop(); | ||
switch (_ret) { | ||
case "continue": | ||
continue; | ||
default: | ||
if ((0, _typeof2.default)(_ret) === "object") return _ret.v; | ||
} | ||
} | ||
} catch (err) { | ||
_didIteratorError = true; | ||
_iteratorError = err; | ||
} finally { | ||
try { | ||
if (!_iteratorNormalCompletion && _iterator.return != null) { | ||
_iterator.return(); | ||
} | ||
} finally { | ||
if (_didIteratorError) { | ||
throw _iteratorError; | ||
} | ||
} | ||
} | ||
return true; | ||
} | ||
if (Object.keys(potentialSubset).length > Object.keys(superset).length) { | ||
return false; | ||
} | ||
var _arr = Object.entries(potentialSubset); | ||
for (var _i = 0; _i < _arr.length; _i++) { | ||
var _arr$_i = (0, _slicedToArray2.default)(_arr[_i], 2), | ||
key = _arr$_i[0], | ||
value = _arr$_i[1]; | ||
if ((0, _typeof2.default)(value) === 'object') { | ||
if (visited.includes(value)) { | ||
continue; | ||
} | ||
visited.push(value); | ||
if ((0, _typeof2.default)(superset[key]) !== 'object') { | ||
if (leftType === 'array' && rightType === 'array') { | ||
if (left.length !== right.length) { | ||
return false; | ||
} | ||
if (!isSubset(value, superset[key], visited)) { | ||
return false; | ||
} | ||
for (var i = 0; i < left.length; i++) { | ||
var leftItem = left[i], | ||
rightItem = right[i]; | ||
var areEqual = compare.equal(leftItem, rightItem); | ||
continue; | ||
} | ||
if (cmp.ne(value, superset[key])) { | ||
return false; | ||
} | ||
} | ||
return true; | ||
}; | ||
var isSubsetStructure = function isSubsetStructure(derived, base, verified) { | ||
if (!verified) { | ||
verified = []; | ||
} | ||
for (var i in derived) { | ||
if (verified.indexOf(derived[i]) === -1) { | ||
if ((0, _typeof2.default)(derived[i]) === 'object') { | ||
verified.push(derived[i]); | ||
if (!areEqual) { | ||
return false; | ||
} | ||
} | ||
if ((0, _typeof2.default)(base[i]) !== (0, _typeof2.default)(derived[i]) || (0, _typeof2.default)(derived[i]) === 'object' && !isSubsetStructure(derived[i], base[i], verified)) { | ||
return false; | ||
} | ||
return true; | ||
} | ||
} | ||
return true; | ||
}; | ||
if (leftType === 'object' && rightType === 'object') { | ||
var _areEqual = isSubsetOf(left, right) && isSubsetOf(right, left); | ||
var wrap = function wrap(fn1, fn2) { | ||
return function () { | ||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
return _areEqual; | ||
} | ||
return Reflect.apply(fn2, this, [fn1].concat(args)); | ||
}; | ||
}; | ||
var unwrap = function unwrap(obj) { | ||
if (obj === null) { | ||
return obj; | ||
} else if ((0, _typeof2.default)(obj) === 'object' && (obj.constructor === Number || obj.constructor === String || obj.constructor === Boolean)) { | ||
return obj.valueOf(); | ||
} | ||
return obj; | ||
}; | ||
var processTypes = function processTypes(fn, first, second) { | ||
first = unwrap(first); | ||
second = unwrap(second); | ||
return fn(first, second); | ||
}; | ||
var processTypesStructure = function processTypesStructure(fn, first, second) { | ||
if ((0, _typeof2.default)(first) !== 'object' || (0, _typeof2.default)(second) !== 'object') { | ||
return false; | ||
} | ||
if (first && second && (first.constructor === Array || second.constructor === Array)) { | ||
return false; | ||
} | ||
return fn(first, second); | ||
}; | ||
cmp = { | ||
eq: function eq(first, second) { | ||
// If two functions shall be compared, compare their source code. | ||
if (typeof first === 'function' && typeof second === 'function') { | ||
first = first.toString(); | ||
second = second.toString(); | ||
} // Objects are compared as subsets, but only if both are defined (i.e. not null, undefined, ...). | ||
if ((0, _typeof2.default)(first) === 'object' && (0, _typeof2.default)(second) === 'object' && first && second) { | ||
if (Array.isArray(first) && !Array.isArray(second) || !Array.isArray(first) && Array.isArray(second)) { | ||
return false; | ||
} | ||
return isSubset(first, second) && isSubset(second, first); | ||
if (leftType === 'function' && rightType === 'function') { | ||
var leftSource = left.toString(), | ||
rightSource = right.toString(); | ||
return leftSource === rightSource; | ||
} | ||
return first === second; | ||
var leftUnboxed = unbox(left), | ||
rightUnboxed = unbox(right); | ||
return leftUnboxed === rightUnboxed; | ||
}, | ||
eqs: function eqs(first, second) { | ||
// If exactly one is null, they are not equal by structure. | ||
if (first && !second || !first && second) { | ||
notEqual: function notEqual(left, right) { | ||
return !compare.equal(left, right); | ||
}, | ||
lessThan: function lessThan(left, right) { | ||
var leftType = Type.of(left), | ||
rightType = Type.of(right); | ||
if (leftType !== rightType || leftType === 'function' && rightType === 'function') { | ||
return false; | ||
} // If both are null, they are equal by structure. | ||
} | ||
if (!first && !second) { | ||
return true; | ||
if (leftType === 'array' && rightType === 'array' || leftType === 'object' && rightType === 'object') { | ||
var isLessThan = isSubsetOf(left, right) && !isSubsetOf(right, left); | ||
return isLessThan; | ||
} | ||
return isSubsetStructure(first, second) && isSubsetStructure(second, first); | ||
var leftUnboxed = unbox(left), | ||
rightUnboxed = unbox(right); | ||
return leftUnboxed < rightUnboxed; | ||
}, | ||
ne: function ne(first, second) { | ||
return !this.eq(first, second); | ||
lessThanOrEqual: function lessThanOrEqual(left, right) { | ||
return compare.lessThan(left, right) || compare.equal(left, right); | ||
}, | ||
nes: function nes(first, second) { | ||
return !this.eqs(first, second); | ||
greaterThan: function greaterThan(left, right) { | ||
return compare.lessThan(right, left); | ||
}, | ||
gt: function gt(first, second) { | ||
// If at least one parameter is a function, greater than does not make sense. | ||
if (typeof first === 'function' || typeof second === 'function') { | ||
greaterThanOrEqual: function greaterThanOrEqual(left, right) { | ||
return compare.lessThan(right, left) || compare.equal(right, left); | ||
}, | ||
identity: function identity(left, right) { | ||
return left === right; | ||
}, | ||
equalByStructure: function equalByStructure(left, right) { | ||
var leftType = Type.of(left), | ||
rightType = Type.of(right); | ||
if (leftType !== 'object' || rightType !== 'object') { | ||
return false; | ||
} // Objects are compared as subsets, but only if both are defined (i.e. not null, undefined, ...). | ||
} | ||
var areEqualByStructure = isSubsetOf.structural(left, right) && isSubsetOf.structural(right, left); | ||
return areEqualByStructure; | ||
}, | ||
notEqualByStructure: function notEqualByStructure(left, right) { | ||
var leftType = Type.of(left), | ||
rightType = Type.of(right); | ||
if ((0, _typeof2.default)(first) === 'object' && (0, _typeof2.default)(second) === 'object' && first && second) { | ||
return isSubset(second, first) && !isSubset(first, second); | ||
} // If an object is compared with null, neither is greater. | ||
if (leftType !== 'object' || rightType !== 'object') { | ||
return false; | ||
} | ||
return !compare.equalByStructure(left, right); | ||
}, | ||
lessThanByStructure: function lessThanByStructure(left, right) { | ||
var leftType = Type.of(left), | ||
rightType = Type.of(right); | ||
if ((0, _typeof2.default)(first) === 'object' && !second || (0, _typeof2.default)(second) === 'object' && !first) { | ||
if (leftType !== 'object' || rightType !== 'object') { | ||
return false; | ||
} | ||
return first > second; | ||
var isLessThanByStructure = isSubsetOf.structural(left, right) && !isSubsetOf.structural(right, left); | ||
return isLessThanByStructure; | ||
}, | ||
gts: function gts(first, second) { | ||
// If the second object is null, the first is greater by structure. | ||
if (first && !second) { | ||
return true; | ||
} // Otherwise, if the first is null, it is not greater (no matter what the second is). | ||
lessThanOrEqualByStructure: function lessThanOrEqualByStructure(left, right) { | ||
var leftType = Type.of(left), | ||
rightType = Type.of(right); | ||
if (!first) { | ||
if (leftType !== 'object' || rightType !== 'object') { | ||
return false; | ||
} // If both are not null, compare as a subset. Note that second must be a subset of first, if first | ||
// is greater than second. | ||
} | ||
return isSubsetStructure(second, first) && !isSubsetStructure(first, second); | ||
return compare.lessThanByStructure(left, right) || compare.equalByStructure(left, right); | ||
}, | ||
ge: function ge(first, second) { | ||
return this.gt(first, second) || this.eq(first, second); | ||
}, | ||
ges: function ges(first, second) { | ||
return this.gts(first, second) || this.eqs(first, second); | ||
}, | ||
lt: function lt(first, second) { | ||
// If at least one parameter is a function, less than does not make sense. | ||
if (typeof first === 'function' || typeof second === 'function') { | ||
return false; | ||
} // Objects are compared as subsets, but only if both are defined (i.e. not null, undefined, ...). | ||
greaterThanByStructure: function greaterThanByStructure(left, right) { | ||
var leftType = Type.of(left), | ||
rightType = Type.of(right); | ||
if ((0, _typeof2.default)(first) === 'object' && (0, _typeof2.default)(second) === 'object' && first && second) { | ||
return isSubset(first, second) && !isSubset(second, first); | ||
} // If an object is compared with null, neither is greater. | ||
if ((0, _typeof2.default)(first) === 'object' && !second || (0, _typeof2.default)(second) === 'object' && !first) { | ||
if (leftType !== 'object' || rightType !== 'object') { | ||
return false; | ||
} | ||
return first < second; | ||
return compare.lessThanByStructure(right, left); | ||
}, | ||
lts: function lts(first, second) { | ||
// If the first object is null, it is less by structure. | ||
if (!first && second) { | ||
return true; | ||
} // Otherwise, if the second is null, the first is not less (no matter what it is). | ||
greaterThanOrEqualByStructure: function greaterThanOrEqualByStructure(left, right) { | ||
var leftType = Type.of(left), | ||
rightType = Type.of(right); | ||
if (!second) { | ||
if (leftType !== 'object' || rightType !== 'object') { | ||
return false; | ||
} // If both are not null, compare as a subset. Note that first must be a subset of second, if first | ||
// is less than second. | ||
} | ||
return isSubsetStructure(first, second) && !isSubsetStructure(second, first); | ||
return compare.lessThanByStructure(right, left) || compare.equalByStructure(right, left); | ||
}, | ||
le: function le(first, second) { | ||
return this.lt(first, second) || this.eq(first, second); | ||
eq: function eq(left, right) { | ||
return compare.equal(left, right); | ||
}, | ||
les: function les(first, second) { | ||
return this.lts(first, second) || this.eqs(first, second); | ||
ne: function ne(left, right) { | ||
return compare.notEqual(left, right); | ||
}, | ||
id: function id(first, second) { | ||
// Functions and objects need to be compared by reference, all other types are compared by value. | ||
if (typeof first === 'function' && typeof second === 'function' || (0, _typeof2.default)(first) === 'object' && (0, _typeof2.default)(second) === 'object') { | ||
return first === second; | ||
} | ||
return this.eq(first, second); | ||
lt: function lt(left, right) { | ||
return compare.lessThan(left, right); | ||
}, | ||
lte: function lte(left, right) { | ||
return compare.lessThanOrEqual(left, right); | ||
}, | ||
gt: function gt(left, right) { | ||
return compare.greaterThan(left, right); | ||
}, | ||
gte: function gte(left, right) { | ||
return compare.greaterThanOrEqual(left, right); | ||
}, | ||
id: function id(left, right) { | ||
return compare.identity(left, right); | ||
}, | ||
eqs: function eqs(left, right) { | ||
return compare.equalByStructure(left, right); | ||
}, | ||
nes: function nes(left, right) { | ||
return compare.notEqualByStructure(left, right); | ||
}, | ||
lts: function lts(left, right) { | ||
return compare.lessThanByStructure(left, right); | ||
}, | ||
ltes: function ltes(left, right) { | ||
return compare.lessThanOrEqualByStructure(left, right); | ||
}, | ||
gts: function gts(left, right) { | ||
return compare.greaterThanByStructure(left, right); | ||
}, | ||
gtes: function gtes(left, right) { | ||
return compare.greaterThanOrEqualByStructure(left, right); | ||
} | ||
}; | ||
var setupFunction = function setupFunction(comparer, fn) { | ||
return wrap(comparer.bind(cmp), fn); | ||
}; | ||
for (var j in cmp) { | ||
if (cmp.hasOwnProperty(j)) { | ||
if (j.length === 3) { | ||
module.exports[j] = module.exports[alias[j]] = setupFunction(cmp[j], processTypesStructure); | ||
} else { | ||
module.exports[j] = module.exports[alias[j]] = setupFunction(cmp[j], processTypes); | ||
} | ||
} | ||
} | ||
module.exports = compare; |
{ | ||
"name": "comparejs", | ||
"version": "1.0.3", | ||
"version": "2.0.0", | ||
"description": "comparejs implements JavaScript's comparison operators the way you would expect them to be.", | ||
@@ -24,4 +24,8 @@ "contributors": [ | ||
"main": "dist/compare.js", | ||
"dependencies": { | ||
"is-subset-of": "1.0.0", | ||
"typedescriptor": "1.0.0" | ||
}, | ||
"devDependencies": { | ||
"roboter": "4.0.0", | ||
"roboter": "4.0.2", | ||
"should": "13.2.3" | ||
@@ -28,0 +32,0 @@ }, |
@@ -16,3 +16,3 @@ # comparejs | ||
```javascript | ||
const cmp = require('comparejs'); | ||
const compare = require('comparejs'); | ||
``` | ||
@@ -22,3 +22,3 @@ | ||
- Supports comparison of `number`, `string`, `boolean`, `function`, `object`, `array` and `undefined`. | ||
- Supports comparison of `array`, `boolean`, `function`, `null`, `number`, `object`, `string` and `undefined`. | ||
- Supports comparison of native data types and constructor-created data types, such as `number` and `new Number()`. | ||
@@ -31,19 +31,16 @@ - Supports comparison of objects and arrays using deep-equal. | ||
- Supports comparison by equality and identity, depending on what makes sense. | ||
- Developed using TDD and backed up by more than 930 unit tests. | ||
### Basic usage | ||
Now you are able to use the various comparison operators. All you need to do is access the `cmp` object and | ||
use its functions: | ||
Now you are able to use the various comparison operators. All you need to do is access the `compare` object and use its functions: | ||
<table> | ||
<tr><th>Operator</th><th>Alias</th><th>Description</th></tr> | ||
<tr><td>cmp.eq(first, second)</td><td>cmp.equal(first, second)</td><td>equal</td></tr> | ||
<tr><td>cmp.ne(first, second)</td><td>cmp.notEqual(first, second)</td><td>not equal</td></tr> | ||
<tr><td>cmp.gt(first, second)</td><td>cmp.greaterThan(first, second)</td><td>greater than</td></tr> | ||
<tr><td>cmp.ge(first, second)</td><td>cmp.greaterThanOrEqual(first, second)</td><td>greater than or equal</td></tr> | ||
<tr><td>cmp.lt(first, second)</td><td>cmp.lessThan(first, second)</td><td>less than</td></tr> | ||
<tr><td>cmp.le(first, second)</td><td>cmp.lessThanOrEqual(first, second)</td><td>less than or equal</td></tr> | ||
<tr><td>cmp.id(first, second)</td><td>cmp.identical(first, second)</td><td>identical</td></tr> | ||
</table> | ||
| Operator | Alias | Description | | ||
| --------------------------------- | ------------------ | --------------------- | | ||
| `equal(left, right)` | `eq(left, right)` | equal | | ||
| `notEqual(left, right)` | `ne(left, right)` | not equal | | ||
| `lessThan(left, right)` | `lt(left, right)` | less than | | ||
| `lessThanOrEqual(left, right)` | `lte(left, right)` | less than or equal | | ||
| `greaterThan(left, right)` | `gt(left, right)` | greater than | | ||
| `greaterThanOrEqual(left, right)` | `gte(left, right)` | greater than or equal | | ||
| `identity(left, right)` | `id(left, right)` | identity | | ||
@@ -56,11 +53,10 @@ Please note that each comparison operator works on each combination of types and does what you would expect it to do. | ||
<table> | ||
<tr><th>Operator</th><th>Alias</th><th>Description</th></tr> | ||
<tr><td>cmp.eqs(first, second)</td><td>cmp.equalByStructure(first, second)</td><td>equal by structure</td></tr> | ||
<tr><td>cmp.nes(first, second)</td><td>cmp.notEqualByStructure(first, second)</td><td>not equal by structure</td></tr> | ||
<tr><td>cmp.gts(first, second)</td><td>cmp.greaterThanByStructure(first, second)</td><td>greater than by structure</td></tr> | ||
<tr><td>cmp.ges(first, second)</td><td>cmp.greaterThanOrEqualByStructure(first, second)</td><td>greater than or equal by structure</td></tr> | ||
<tr><td>cmp.lts(first, second)</td><td>cmp.lessThanByStructure(first, second)</td><td>less than by structure</td></tr> | ||
<tr><td>cmp.les(first, second)</td><td>cmp.lessThanOrEqualByStructure(first, second)</td><td>less than or equal by structure</td></tr> | ||
</table> | ||
| Operator | Alias | Description | | ||
| -------------------------------------------- | ------------------- | ---------------------------------- | | ||
| `equalByStructure(left, right)` | `eqs(left, right)` | equal by structure | | ||
| `notEqualByStructure(left, right)` | `nes(left, right)` | not equal by structure | | ||
| `lessThanByStructure(left, right)` | `lts(left, right)` | less than by structure | | ||
| `lessThanOrEqualByStructure(left, right)` | `ltes(left, right)` | less than or equal by structure | | ||
| `greaterThanByStructure(left, right)` | `gts(left, right)` | greater than by structure | | ||
| `greaterThanOrEqualByStructure(left, right)` | `gtes(left, right)` | greater than or equal by structure | | ||
@@ -67,0 +63,0 @@ Please note that these operators only work for objects. For any other type, they return `false`. |
'use strict'; | ||
const alias = { | ||
eq: 'equal', | ||
ne: 'notEqual', | ||
gt: 'greaterThan', | ||
ge: 'greaterThanOrEqual', | ||
lt: 'lessThan', | ||
le: 'lessThanOrEqual', | ||
id: 'identical', | ||
const isSubsetOf = require('is-subset-of'), | ||
Type = require('typedescriptor'); | ||
eqs: 'equalByStructure', | ||
nes: 'notEqualByStructure', | ||
gts: 'greaterThanByStructure', | ||
ges: 'greaterThanOrEqualByStructure', | ||
lts: 'lessThanByStructure', | ||
les: 'lessThanOrEqualByStructure' | ||
}; | ||
const unbox = require('./unbox'); | ||
let cmp; | ||
const compare = { | ||
equal (left, right) { | ||
const leftType = Type.of(left), | ||
rightType = Type.of(right); | ||
const isSubset = function (potentialSubset, superset, visited = []) { | ||
if (typeof potentialSubset !== 'object') { | ||
throw new Error('Potential subset must be an object.'); | ||
} | ||
if (typeof superset !== 'object') { | ||
throw new Error('Superset must be an object.'); | ||
} | ||
if (leftType === 'array' && rightType === 'array') { | ||
if (left.length !== right.length) { | ||
return false; | ||
} | ||
if ( | ||
(potentialSubset === null && superset !== null) || | ||
(potentialSubset !== null && superset === null) | ||
) { | ||
return false; | ||
} | ||
for (let i = 0; i < left.length; i++) { | ||
const leftItem = left[i], | ||
rightItem = right[i]; | ||
if (potentialSubset === null && superset === null) { | ||
return true; | ||
} | ||
const areEqual = compare.equal(leftItem, rightItem); | ||
if ( | ||
(Array.isArray(potentialSubset) && !Array.isArray(superset)) || | ||
(!Array.isArray(potentialSubset) && Array.isArray(superset)) | ||
) { | ||
return false; | ||
} | ||
if (Array.isArray(potentialSubset) && Array.isArray(superset)) { | ||
if (potentialSubset.length > superset.length) { | ||
return false; | ||
} | ||
for (const item of potentialSubset) { | ||
if (typeof item === 'object') { | ||
if (visited.includes(item)) { | ||
continue; | ||
} | ||
visited.push(item); | ||
/* eslint-disable no-loop-func */ | ||
const supersetHasItem = superset.some(superItem => cmp.eq(item, superItem)); | ||
/* eslint-enable no-loop-func */ | ||
if (!supersetHasItem) { | ||
if (!areEqual) { | ||
return false; | ||
} | ||
continue; | ||
} | ||
/* eslint-disable no-loop-func */ | ||
const supersetHasItem = superset.some(superItem => cmp.eq(item, superItem)); | ||
/* eslint-enable no-loop-func */ | ||
if (!supersetHasItem) { | ||
return false; | ||
} | ||
return true; | ||
} | ||
return true; | ||
} | ||
if (leftType === 'object' && rightType === 'object') { | ||
const areEqual = isSubsetOf(left, right) && isSubsetOf(right, left); | ||
if (Object.keys(potentialSubset).length > Object.keys(superset).length) { | ||
return false; | ||
} | ||
for (const [ key, value ] of Object.entries(potentialSubset)) { | ||
if (typeof value === 'object') { | ||
if (visited.includes(value)) { | ||
continue; | ||
} | ||
visited.push(value); | ||
if (typeof superset[key] !== 'object') { | ||
return false; | ||
} | ||
if (!isSubset(value, superset[key], visited)) { | ||
return false; | ||
} | ||
continue; | ||
return areEqual; | ||
} | ||
if (cmp.ne(value, superset[key])) { | ||
return false; | ||
} | ||
} | ||
if (leftType === 'function' && rightType === 'function') { | ||
const leftSource = left.toString(), | ||
rightSource = right.toString(); | ||
return true; | ||
}; | ||
const isSubsetStructure = function (derived, base, verified) { | ||
if (!verified) { | ||
verified = []; | ||
} | ||
for (const i in derived) { | ||
if (verified.indexOf(derived[i]) === -1) { | ||
if (typeof derived[i] === 'object') { | ||
verified.push(derived[i]); | ||
} | ||
if ( | ||
(typeof base[i] !== typeof derived[i]) || | ||
(typeof derived[i] === 'object' && !isSubsetStructure(derived[i], base[i], verified)) | ||
) { | ||
return false; | ||
} | ||
return leftSource === rightSource; | ||
} | ||
} | ||
return true; | ||
}; | ||
const leftUnboxed = unbox(left), | ||
rightUnboxed = unbox(right); | ||
const wrap = function (fn1, fn2) { | ||
return function (...args) { | ||
return Reflect.apply(fn2, this, [ fn1, ...args ]); | ||
}; | ||
}; | ||
const unwrap = function (obj) { | ||
if (obj === null) { | ||
return obj; | ||
} else if (typeof obj === 'object' && (obj.constructor === Number || obj.constructor === String || obj.constructor === Boolean)) { | ||
return obj.valueOf(); | ||
} | ||
return obj; | ||
}; | ||
const processTypes = function (fn, first, second) { | ||
first = unwrap(first); | ||
second = unwrap(second); | ||
return fn(first, second); | ||
}; | ||
const processTypesStructure = function (fn, first, second) { | ||
if (typeof first !== 'object' || typeof second !== 'object') { | ||
return false; | ||
} | ||
if (first && second && (first.constructor === Array || second.constructor === Array)) { | ||
return false; | ||
} | ||
return fn(first, second); | ||
}; | ||
cmp = { | ||
eq (first, second) { | ||
// If two functions shall be compared, compare their source code. | ||
if (typeof first === 'function' && typeof second === 'function') { | ||
first = first.toString(); | ||
second = second.toString(); | ||
} | ||
// Objects are compared as subsets, but only if both are defined (i.e. not null, undefined, ...). | ||
if (typeof first === 'object' && typeof second === 'object' && first && second) { | ||
if ( | ||
(Array.isArray(first) && !Array.isArray(second)) || | ||
(!Array.isArray(first) && Array.isArray(second)) | ||
) { | ||
return false; | ||
} | ||
return isSubset(first, second) && isSubset(second, first); | ||
} | ||
return first === second; | ||
return leftUnboxed === rightUnboxed; | ||
}, | ||
notEqual (left, right) { | ||
return !compare.equal(left, right); | ||
}, | ||
lessThan (left, right) { | ||
const leftType = Type.of(left), | ||
rightType = Type.of(right); | ||
eqs (first, second) { | ||
// If exactly one is null, they are not equal by structure. | ||
if ((first && !second) || (!first && second)) { | ||
if ( | ||
(leftType !== rightType) || | ||
(leftType === 'function' && rightType === 'function') | ||
) { | ||
return false; | ||
} | ||
// If both are null, they are equal by structure. | ||
if (!first && !second) { | ||
return true; | ||
if ( | ||
(leftType === 'array' && rightType === 'array') || | ||
(leftType === 'object' && rightType === 'object') | ||
) { | ||
const isLessThan = isSubsetOf(left, right) && !isSubsetOf(right, left); | ||
return isLessThan; | ||
} | ||
return isSubsetStructure(first, second) && isSubsetStructure(second, first); | ||
}, | ||
const leftUnboxed = unbox(left), | ||
rightUnboxed = unbox(right); | ||
ne (first, second) { | ||
return !this.eq(first, second); | ||
return leftUnboxed < rightUnboxed; | ||
}, | ||
nes (first, second) { | ||
return !this.eqs(first, second); | ||
lessThanOrEqual (left, right) { | ||
return compare.lessThan(left, right) || compare.equal(left, right); | ||
}, | ||
greaterThan (left, right) { | ||
return compare.lessThan(right, left); | ||
}, | ||
greaterThanOrEqual (left, right) { | ||
return compare.lessThan(right, left) || compare.equal(right, left); | ||
}, | ||
identity (left, right) { | ||
return left === right; | ||
}, | ||
gt (first, second) { | ||
// If at least one parameter is a function, greater than does not make sense. | ||
if (typeof first === 'function' || typeof second === 'function') { | ||
equalByStructure (left, right) { | ||
const leftType = Type.of(left), | ||
rightType = Type.of(right); | ||
if (leftType !== 'object' || rightType !== 'object') { | ||
return false; | ||
} | ||
// Objects are compared as subsets, but only if both are defined (i.e. not null, undefined, ...). | ||
if (typeof first === 'object' && typeof second === 'object' && first && second) { | ||
return isSubset(second, first) && !isSubset(first, second); | ||
} | ||
const areEqualByStructure = | ||
isSubsetOf.structural(left, right) && | ||
isSubsetOf.structural(right, left); | ||
// If an object is compared with null, neither is greater. | ||
if ((typeof first === 'object' && !second) || (typeof second === 'object' && !first)) { | ||
return areEqualByStructure; | ||
}, | ||
notEqualByStructure (left, right) { | ||
const leftType = Type.of(left), | ||
rightType = Type.of(right); | ||
if (leftType !== 'object' || rightType !== 'object') { | ||
return false; | ||
} | ||
return first > second; | ||
return !compare.equalByStructure(left, right); | ||
}, | ||
lessThanByStructure (left, right) { | ||
const leftType = Type.of(left), | ||
rightType = Type.of(right); | ||
gts (first, second) { | ||
// If the second object is null, the first is greater by structure. | ||
if (first && !second) { | ||
return true; | ||
} | ||
// Otherwise, if the first is null, it is not greater (no matter what the second is). | ||
if (!first) { | ||
if (leftType !== 'object' || rightType !== 'object') { | ||
return false; | ||
} | ||
// If both are not null, compare as a subset. Note that second must be a subset of first, if first | ||
// is greater than second. | ||
return isSubsetStructure(second, first) && !isSubsetStructure(first, second); | ||
}, | ||
const isLessThanByStructure = | ||
isSubsetOf.structural(left, right) && | ||
!isSubsetOf.structural(right, left); | ||
ge (first, second) { | ||
return this.gt(first, second) || this.eq(first, second); | ||
return isLessThanByStructure; | ||
}, | ||
lessThanOrEqualByStructure (left, right) { | ||
const leftType = Type.of(left), | ||
rightType = Type.of(right); | ||
ges (first, second) { | ||
return this.gts(first, second) || this.eqs(first, second); | ||
}, | ||
lt (first, second) { | ||
// If at least one parameter is a function, less than does not make sense. | ||
if (typeof first === 'function' || typeof second === 'function') { | ||
if (leftType !== 'object' || rightType !== 'object') { | ||
return false; | ||
} | ||
// Objects are compared as subsets, but only if both are defined (i.e. not null, undefined, ...). | ||
if (typeof first === 'object' && typeof second === 'object' && first && second) { | ||
return isSubset(first, second) && !isSubset(second, first); | ||
} | ||
return compare.lessThanByStructure(left, right) || compare.equalByStructure(left, right); | ||
}, | ||
greaterThanByStructure (left, right) { | ||
const leftType = Type.of(left), | ||
rightType = Type.of(right); | ||
// If an object is compared with null, neither is greater. | ||
if ((typeof first === 'object' && !second) || (typeof second === 'object' && !first)) { | ||
if (leftType !== 'object' || rightType !== 'object') { | ||
return false; | ||
} | ||
return first < second; | ||
return compare.lessThanByStructure(right, left); | ||
}, | ||
greaterThanOrEqualByStructure (left, right) { | ||
const leftType = Type.of(left), | ||
rightType = Type.of(right); | ||
lts (first, second) { | ||
// If the first object is null, it is less by structure. | ||
if (!first && second) { | ||
return true; | ||
} | ||
// Otherwise, if the second is null, the first is not less (no matter what it is). | ||
if (!second) { | ||
if (leftType !== 'object' || rightType !== 'object') { | ||
return false; | ||
} | ||
// If both are not null, compare as a subset. Note that first must be a subset of second, if first | ||
// is less than second. | ||
return isSubsetStructure(first, second) && !isSubsetStructure(second, first); | ||
return compare.lessThanByStructure(right, left) || compare.equalByStructure(right, left); | ||
}, | ||
le (first, second) { | ||
return this.lt(first, second) || this.eq(first, second); | ||
eq (left, right) { | ||
return compare.equal(left, right); | ||
}, | ||
ne (left, right) { | ||
return compare.notEqual(left, right); | ||
}, | ||
lt (left, right) { | ||
return compare.lessThan(left, right); | ||
}, | ||
lte (left, right) { | ||
return compare.lessThanOrEqual(left, right); | ||
}, | ||
gt (left, right) { | ||
return compare.greaterThan(left, right); | ||
}, | ||
gte (left, right) { | ||
return compare.greaterThanOrEqual(left, right); | ||
}, | ||
id (left, right) { | ||
return compare.identity(left, right); | ||
}, | ||
les (first, second) { | ||
return this.lts(first, second) || this.eqs(first, second); | ||
eqs (left, right) { | ||
return compare.equalByStructure(left, right); | ||
}, | ||
id (first, second) { | ||
// Functions and objects need to be compared by reference, all other types are compared by value. | ||
if ( | ||
(typeof first === 'function' && typeof second === 'function') || | ||
(typeof first === 'object' && typeof second === 'object') | ||
) { | ||
return first === second; | ||
} | ||
return this.eq(first, second); | ||
nes (left, right) { | ||
return compare.notEqualByStructure(left, right); | ||
}, | ||
lts (left, right) { | ||
return compare.lessThanByStructure(left, right); | ||
}, | ||
ltes (left, right) { | ||
return compare.lessThanOrEqualByStructure(left, right); | ||
}, | ||
gts (left, right) { | ||
return compare.greaterThanByStructure(left, right); | ||
}, | ||
gtes (left, right) { | ||
return compare.greaterThanOrEqualByStructure(left, right); | ||
} | ||
}; | ||
const setupFunction = function (comparer, fn) { | ||
return wrap(comparer.bind(cmp), fn); | ||
}; | ||
for (const j in cmp) { | ||
if (cmp.hasOwnProperty(j)) { | ||
if (j.length === 3) { | ||
module.exports[j] = module.exports[alias[j]] = setupFunction(cmp[j], processTypesStructure); | ||
} else { | ||
module.exports[j] = module.exports[alias[j]] = setupFunction(cmp[j], processTypes); | ||
} | ||
} | ||
} | ||
module.exports = compare; |
@@ -26,3 +26,3 @@ 'use strict'; | ||
test('ge x greaterThanOrEqual', done => { | ||
cmp.eq(cmp.ge(23, 23), cmp.greaterThanOrEqual(23, 23)).should.equal(true); | ||
cmp.eq(cmp.gte(23, 23), cmp.greaterThanOrEqual(23, 23)).should.equal(true); | ||
done(); | ||
@@ -37,3 +37,3 @@ }); | ||
test('le x lessThanOrEqual', done => { | ||
cmp.eq(cmp.le(23, 23), cmp.lessThanOrEqual(23, 23)).should.equal(true); | ||
cmp.eq(cmp.lte(23, 23), cmp.lessThanOrEqual(23, 23)).should.equal(true); | ||
done(); | ||
@@ -43,3 +43,3 @@ }); | ||
test('id x identical', done => { | ||
cmp.eq(cmp.id(23, 23), cmp.identical(23, 23)).should.equal(true); | ||
cmp.eq(cmp.id(23, 23), cmp.identity(23, 23)).should.equal(true); | ||
done(); | ||
@@ -64,3 +64,3 @@ }); | ||
test('ges x greaterThanOrEqualByStructure', done => { | ||
cmp.eq(cmp.ges({ }, { }), cmp.greaterThanOrEqualByStructure({ }, { })).should.equal(true); | ||
cmp.eq(cmp.gtes({ }, { }), cmp.greaterThanOrEqualByStructure({ }, { })).should.equal(true); | ||
done(); | ||
@@ -75,5 +75,5 @@ }); | ||
test('les x lessThanOrEqualByStructure', done => { | ||
cmp.eq(cmp.les({ }, { }), cmp.lessThanOrEqualByStructure({ }, { })).should.equal(true); | ||
cmp.eq(cmp.ltes({ }, { }), cmp.lessThanOrEqualByStructure({ }, { })).should.equal(true); | ||
done(); | ||
}); | ||
}); |
@@ -350,6 +350,6 @@ 'use strict'; | ||
suite('ge', () => { | ||
suite('gte', () => { | ||
suite('greater than => true', () => { | ||
test('array x array', done => { | ||
cmp.ge(a1, empty).should.equal(true); | ||
cmp.gte(a1, empty).should.equal(true); | ||
done(); | ||
@@ -359,3 +359,3 @@ }); | ||
test('array x Array()', done => { | ||
cmp.ge(a1, Empty).should.equal(true); | ||
cmp.gte(a1, Empty).should.equal(true); | ||
done(); | ||
@@ -365,3 +365,3 @@ }); | ||
test('Array() x array', done => { | ||
cmp.ge(A1, empty).should.equal(true); | ||
cmp.gte(A1, empty).should.equal(true); | ||
done(); | ||
@@ -371,3 +371,3 @@ }); | ||
test('Array() x Array()', done => { | ||
cmp.ge(A1, Empty).should.equal(true); | ||
cmp.gte(A1, Empty).should.equal(true); | ||
done(); | ||
@@ -377,3 +377,3 @@ }); | ||
test('array[3] x array[1]', done => { | ||
cmp.ge([ 2, 3, 4 ], [ 3 ]).should.equal(true); | ||
cmp.gte([ 2, 3, 4 ], [ 3 ]).should.equal(true); | ||
done(); | ||
@@ -385,3 +385,3 @@ }); | ||
test('array x array', done => { | ||
cmp.ge(a1, a2).should.equal(true); | ||
cmp.gte(a1, a2).should.equal(true); | ||
done(); | ||
@@ -391,3 +391,3 @@ }); | ||
test('array x Array()', done => { | ||
cmp.ge(a1, A1).should.equal(true); | ||
cmp.gte(a1, A1).should.equal(true); | ||
done(); | ||
@@ -397,3 +397,3 @@ }); | ||
test('Array() x array', done => { | ||
cmp.ge(A1, a1).should.equal(true); | ||
cmp.gte(A1, a1).should.equal(true); | ||
done(); | ||
@@ -403,3 +403,3 @@ }); | ||
test('Array() x Array()', done => { | ||
cmp.ge(A1, A2).should.equal(true); | ||
cmp.gte(A1, A2).should.equal(true); | ||
done(); | ||
@@ -409,3 +409,3 @@ }); | ||
test('null x null', done => { | ||
cmp.ge(null, null).should.equal(true); | ||
cmp.gte(null, null).should.equal(true); | ||
done(); | ||
@@ -415,3 +415,3 @@ }); | ||
test('array[3] x array[3]', done => { | ||
cmp.ge([ 2, 3, 4 ], [ 2, 3, 4 ]).should.equal(true); | ||
cmp.gte([ 2, 3, 4 ], [ 2, 3, 4 ]).should.equal(true); | ||
done(); | ||
@@ -423,3 +423,3 @@ }); | ||
test('array x array', done => { | ||
cmp.ge(a1, b1).should.equal(false); | ||
cmp.gte(a1, b1).should.equal(false); | ||
done(); | ||
@@ -429,3 +429,3 @@ }); | ||
test('array x Array()', done => { | ||
cmp.ge(a1, B1).should.equal(false); | ||
cmp.gte(a1, B1).should.equal(false); | ||
done(); | ||
@@ -435,3 +435,3 @@ }); | ||
test('Array() x array', done => { | ||
cmp.ge(A1, b1).should.equal(false); | ||
cmp.gte(A1, b1).should.equal(false); | ||
done(); | ||
@@ -441,3 +441,3 @@ }); | ||
test('Array() x Array()', done => { | ||
cmp.ge(A1, B1).should.equal(false); | ||
cmp.gte(A1, B1).should.equal(false); | ||
done(); | ||
@@ -447,3 +447,3 @@ }); | ||
test('array x null', done => { | ||
cmp.ge(a1, null).should.equal(false); | ||
cmp.gte(a1, null).should.equal(false); | ||
done(); | ||
@@ -453,3 +453,3 @@ }); | ||
test('Array() x null', done => { | ||
cmp.ge(A1, null).should.equal(false); | ||
cmp.gte(A1, null).should.equal(false); | ||
done(); | ||
@@ -459,3 +459,3 @@ }); | ||
test('null x array', done => { | ||
cmp.ge(null, a1).should.equal(false); | ||
cmp.gte(null, a1).should.equal(false); | ||
done(); | ||
@@ -465,3 +465,3 @@ }); | ||
test('null x Array()', done => { | ||
cmp.ge(null, A1).should.equal(false); | ||
cmp.gte(null, A1).should.equal(false); | ||
done(); | ||
@@ -471,3 +471,3 @@ }); | ||
test('array[3] x array[3]', done => { | ||
cmp.ge([ 2, 3, 4 ], [ 4, 5, 6 ]).should.equal(false); | ||
cmp.gte([ 2, 3, 4 ], [ 4, 5, 6 ]).should.equal(false); | ||
done(); | ||
@@ -479,3 +479,3 @@ }); | ||
test('array x array', done => { | ||
cmp.ge(empty, a1).should.equal(false); | ||
cmp.gte(empty, a1).should.equal(false); | ||
done(); | ||
@@ -485,3 +485,3 @@ }); | ||
test('array x Array()', done => { | ||
cmp.ge(Empty, a1).should.equal(false); | ||
cmp.gte(Empty, a1).should.equal(false); | ||
done(); | ||
@@ -491,3 +491,3 @@ }); | ||
test('Array() x array', done => { | ||
cmp.ge(empty, A1).should.equal(false); | ||
cmp.gte(empty, A1).should.equal(false); | ||
done(); | ||
@@ -497,3 +497,3 @@ }); | ||
test('Array() x Array()', done => { | ||
cmp.ge(Empty, A1).should.equal(false); | ||
cmp.gte(Empty, A1).should.equal(false); | ||
done(); | ||
@@ -503,3 +503,3 @@ }); | ||
test('array[1] x array[3]', done => { | ||
cmp.ge([ 3 ], [ 2, 3, 4 ]).should.equal(false); | ||
cmp.gte([ 3 ], [ 2, 3, 4 ]).should.equal(false); | ||
done(); | ||
@@ -510,6 +510,6 @@ }); | ||
suite('ges', () => { | ||
suite('gtes', () => { | ||
suite('any => false', () => { | ||
test('array x array', done => { | ||
cmp.ges(a1, a1).should.equal(false); | ||
cmp.gtes(a1, a1).should.equal(false); | ||
done(); | ||
@@ -664,6 +664,6 @@ }); | ||
suite('le', () => { | ||
suite('lte', () => { | ||
suite('greater than => false', () => { | ||
test('array x array', done => { | ||
cmp.le(a1, empty).should.equal(false); | ||
cmp.lte(a1, empty).should.equal(false); | ||
done(); | ||
@@ -673,3 +673,3 @@ }); | ||
test('array x Array()', done => { | ||
cmp.le(a1, Empty).should.equal(false); | ||
cmp.lte(a1, Empty).should.equal(false); | ||
done(); | ||
@@ -679,3 +679,3 @@ }); | ||
test('Array() x array', done => { | ||
cmp.le(A1, empty).should.equal(false); | ||
cmp.lte(A1, empty).should.equal(false); | ||
done(); | ||
@@ -685,3 +685,3 @@ }); | ||
test('Array() x Array()', done => { | ||
cmp.le(A1, Empty).should.equal(false); | ||
cmp.lte(A1, Empty).should.equal(false); | ||
done(); | ||
@@ -691,3 +691,3 @@ }); | ||
test('array[3] x array[1]', done => { | ||
cmp.le([ 2, 3, 4 ], [ 3 ]).should.equal(false); | ||
cmp.lte([ 2, 3, 4 ], [ 3 ]).should.equal(false); | ||
done(); | ||
@@ -699,3 +699,3 @@ }); | ||
test('array x array', done => { | ||
cmp.le(a1, a2).should.equal(true); | ||
cmp.lte(a1, a2).should.equal(true); | ||
done(); | ||
@@ -705,3 +705,3 @@ }); | ||
test('array x Array()', done => { | ||
cmp.le(a1, A1).should.equal(true); | ||
cmp.lte(a1, A1).should.equal(true); | ||
done(); | ||
@@ -711,3 +711,3 @@ }); | ||
test('Array() x array', done => { | ||
cmp.le(A1, a1).should.equal(true); | ||
cmp.lte(A1, a1).should.equal(true); | ||
done(); | ||
@@ -717,3 +717,3 @@ }); | ||
test('Array() x Array()', done => { | ||
cmp.le(A1, A2).should.equal(true); | ||
cmp.lte(A1, A2).should.equal(true); | ||
done(); | ||
@@ -723,3 +723,3 @@ }); | ||
test('null x null', done => { | ||
cmp.le(null, null).should.equal(true); | ||
cmp.lte(null, null).should.equal(true); | ||
done(); | ||
@@ -729,3 +729,3 @@ }); | ||
test('array[3] x array[3]', done => { | ||
cmp.le([ 2, 3, 4 ], [ 2, 3, 4 ]).should.equal(true); | ||
cmp.lte([ 2, 3, 4 ], [ 2, 3, 4 ]).should.equal(true); | ||
done(); | ||
@@ -737,3 +737,3 @@ }); | ||
test('array x array', done => { | ||
cmp.le(a1, b1).should.equal(false); | ||
cmp.lte(a1, b1).should.equal(false); | ||
done(); | ||
@@ -743,3 +743,3 @@ }); | ||
test('array x Array()', done => { | ||
cmp.le(a1, B1).should.equal(false); | ||
cmp.lte(a1, B1).should.equal(false); | ||
done(); | ||
@@ -749,3 +749,3 @@ }); | ||
test('Array() x array', done => { | ||
cmp.le(A1, b1).should.equal(false); | ||
cmp.lte(A1, b1).should.equal(false); | ||
done(); | ||
@@ -755,3 +755,3 @@ }); | ||
test('Array() x Array()', done => { | ||
cmp.le(A1, B1).should.equal(false); | ||
cmp.lte(A1, B1).should.equal(false); | ||
done(); | ||
@@ -761,3 +761,3 @@ }); | ||
test('array x null', done => { | ||
cmp.le(a1, null).should.equal(false); | ||
cmp.lte(a1, null).should.equal(false); | ||
done(); | ||
@@ -767,3 +767,3 @@ }); | ||
test('Array() x null', done => { | ||
cmp.le(A1, null).should.equal(false); | ||
cmp.lte(A1, null).should.equal(false); | ||
done(); | ||
@@ -773,3 +773,3 @@ }); | ||
test('null x array', done => { | ||
cmp.le(null, a1).should.equal(false); | ||
cmp.lte(null, a1).should.equal(false); | ||
done(); | ||
@@ -779,3 +779,3 @@ }); | ||
test('null x Array()', done => { | ||
cmp.le(null, A1).should.equal(false); | ||
cmp.lte(null, A1).should.equal(false); | ||
done(); | ||
@@ -785,3 +785,3 @@ }); | ||
test('array[3] x array[3]', done => { | ||
cmp.le([ 2, 3, 4 ], [ 4, 5, 6 ]).should.equal(false); | ||
cmp.lte([ 2, 3, 4 ], [ 4, 5, 6 ]).should.equal(false); | ||
done(); | ||
@@ -793,3 +793,3 @@ }); | ||
test('array x array', done => { | ||
cmp.le(empty, a1).should.equal(true); | ||
cmp.lte(empty, a1).should.equal(true); | ||
done(); | ||
@@ -799,3 +799,3 @@ }); | ||
test('array x Array()', done => { | ||
cmp.le(Empty, a1).should.equal(true); | ||
cmp.lte(Empty, a1).should.equal(true); | ||
done(); | ||
@@ -805,3 +805,3 @@ }); | ||
test('Array() x array', done => { | ||
cmp.le(empty, A1).should.equal(true); | ||
cmp.lte(empty, A1).should.equal(true); | ||
done(); | ||
@@ -811,3 +811,3 @@ }); | ||
test('Array() x Array()', done => { | ||
cmp.le(Empty, A1).should.equal(true); | ||
cmp.lte(Empty, A1).should.equal(true); | ||
done(); | ||
@@ -817,3 +817,3 @@ }); | ||
test('array[1] x array[3]', done => { | ||
cmp.le([ 3 ], [ 2, 3, 4 ]).should.equal(true); | ||
cmp.lte([ 3 ], [ 2, 3, 4 ]).should.equal(true); | ||
done(); | ||
@@ -824,6 +824,6 @@ }); | ||
suite('les', () => { | ||
suite('ltes', () => { | ||
suite('any => false', () => { | ||
test('array x array', done => { | ||
cmp.les(a1, a1).should.equal(false); | ||
cmp.ltes(a1, a1).should.equal(false); | ||
done(); | ||
@@ -830,0 +830,0 @@ }); |
@@ -302,6 +302,6 @@ 'use strict'; | ||
suite('ge', () => { | ||
suite('gte', () => { | ||
suite('greater => true', () => { | ||
test('true x false', done => { | ||
cmp.ge(true, false).should.equal(true); | ||
cmp.gte(true, false).should.equal(true); | ||
done(); | ||
@@ -311,3 +311,3 @@ }); | ||
test('true x False()', done => { | ||
cmp.ge(true, False).should.equal(true); | ||
cmp.gte(true, False).should.equal(true); | ||
done(); | ||
@@ -317,3 +317,3 @@ }); | ||
test('True() x false', done => { | ||
cmp.ge(True, false).should.equal(true); | ||
cmp.gte(True, false).should.equal(true); | ||
done(); | ||
@@ -323,3 +323,3 @@ }); | ||
test('True() x False()', done => { | ||
cmp.ge(True, False).should.equal(true); | ||
cmp.gte(True, False).should.equal(true); | ||
done(); | ||
@@ -331,3 +331,3 @@ }); | ||
test('true x true', done => { | ||
cmp.ge(true, true).should.equal(true); | ||
cmp.gte(true, true).should.equal(true); | ||
done(); | ||
@@ -337,3 +337,3 @@ }); | ||
test('true x True()', done => { | ||
cmp.ge(true, True).should.equal(true); | ||
cmp.gte(true, True).should.equal(true); | ||
done(); | ||
@@ -343,3 +343,3 @@ }); | ||
test('True() x true', done => { | ||
cmp.ge(True, true).should.equal(true); | ||
cmp.gte(True, true).should.equal(true); | ||
done(); | ||
@@ -349,3 +349,3 @@ }); | ||
test('True() x True()', done => { | ||
cmp.ge(True, True).should.equal(true); | ||
cmp.gte(True, True).should.equal(true); | ||
done(); | ||
@@ -355,3 +355,3 @@ }); | ||
test('false x false', done => { | ||
cmp.ge(false, false).should.equal(true); | ||
cmp.gte(false, false).should.equal(true); | ||
done(); | ||
@@ -361,3 +361,3 @@ }); | ||
test('false x False()', done => { | ||
cmp.ge(false, False).should.equal(true); | ||
cmp.gte(false, False).should.equal(true); | ||
done(); | ||
@@ -367,3 +367,3 @@ }); | ||
test('False() x false', done => { | ||
cmp.ge(False, false).should.equal(true); | ||
cmp.gte(False, false).should.equal(true); | ||
done(); | ||
@@ -373,3 +373,3 @@ }); | ||
test('False() x False()', done => { | ||
cmp.ge(False, False).should.equal(true); | ||
cmp.gte(False, False).should.equal(true); | ||
done(); | ||
@@ -381,3 +381,3 @@ }); | ||
test('false x true', done => { | ||
cmp.ge(false, true).should.equal(false); | ||
cmp.gte(false, true).should.equal(false); | ||
done(); | ||
@@ -387,3 +387,3 @@ }); | ||
test('false x True()', done => { | ||
cmp.ge(false, True).should.equal(false); | ||
cmp.gte(false, True).should.equal(false); | ||
done(); | ||
@@ -393,3 +393,3 @@ }); | ||
test('False() x true', done => { | ||
cmp.ge(False, true).should.equal(false); | ||
cmp.gte(False, true).should.equal(false); | ||
done(); | ||
@@ -399,3 +399,3 @@ }); | ||
test('False() x True()', done => { | ||
cmp.ge(False, True).should.equal(false); | ||
cmp.gte(False, True).should.equal(false); | ||
done(); | ||
@@ -406,6 +406,6 @@ }); | ||
suite('ges', () => { | ||
suite('gtes', () => { | ||
suite('any => false', () => { | ||
test('true x true', done => { | ||
cmp.ges(true, true).should.equal(false); | ||
cmp.gtes(true, true).should.equal(false); | ||
done(); | ||
@@ -513,6 +513,6 @@ }); | ||
suite('le', () => { | ||
suite('lte', () => { | ||
suite('greater => false', () => { | ||
test('true x false', done => { | ||
cmp.le(true, false).should.equal(false); | ||
cmp.lte(true, false).should.equal(false); | ||
done(); | ||
@@ -522,3 +522,3 @@ }); | ||
test('true x False()', done => { | ||
cmp.le(true, False).should.equal(false); | ||
cmp.lte(true, False).should.equal(false); | ||
done(); | ||
@@ -528,3 +528,3 @@ }); | ||
test('True() x false', done => { | ||
cmp.le(True, false).should.equal(false); | ||
cmp.lte(True, false).should.equal(false); | ||
done(); | ||
@@ -534,3 +534,3 @@ }); | ||
test('True() x False()', done => { | ||
cmp.le(True, False).should.equal(false); | ||
cmp.lte(True, False).should.equal(false); | ||
done(); | ||
@@ -542,3 +542,3 @@ }); | ||
test('true x true', done => { | ||
cmp.le(true, true).should.equal(true); | ||
cmp.lte(true, true).should.equal(true); | ||
done(); | ||
@@ -548,3 +548,3 @@ }); | ||
test('true x True()', done => { | ||
cmp.le(true, True).should.equal(true); | ||
cmp.lte(true, True).should.equal(true); | ||
done(); | ||
@@ -554,3 +554,3 @@ }); | ||
test('True() x true', done => { | ||
cmp.le(True, true).should.equal(true); | ||
cmp.lte(True, true).should.equal(true); | ||
done(); | ||
@@ -560,3 +560,3 @@ }); | ||
test('True() x True()', done => { | ||
cmp.le(True, True).should.equal(true); | ||
cmp.lte(True, True).should.equal(true); | ||
done(); | ||
@@ -566,3 +566,3 @@ }); | ||
test('false x false', done => { | ||
cmp.le(false, false).should.equal(true); | ||
cmp.lte(false, false).should.equal(true); | ||
done(); | ||
@@ -572,3 +572,3 @@ }); | ||
test('false x False()', done => { | ||
cmp.le(false, False).should.equal(true); | ||
cmp.lte(false, False).should.equal(true); | ||
done(); | ||
@@ -578,3 +578,3 @@ }); | ||
test('False() x false', done => { | ||
cmp.le(False, false).should.equal(true); | ||
cmp.lte(False, false).should.equal(true); | ||
done(); | ||
@@ -584,3 +584,3 @@ }); | ||
test('False() x False()', done => { | ||
cmp.le(False, False).should.equal(true); | ||
cmp.lte(False, False).should.equal(true); | ||
done(); | ||
@@ -592,3 +592,3 @@ }); | ||
test('false x true', done => { | ||
cmp.le(false, true).should.equal(true); | ||
cmp.lte(false, true).should.equal(true); | ||
done(); | ||
@@ -598,3 +598,3 @@ }); | ||
test('false x True()', done => { | ||
cmp.le(false, True).should.equal(true); | ||
cmp.lte(false, True).should.equal(true); | ||
done(); | ||
@@ -604,3 +604,3 @@ }); | ||
test('False() x true', done => { | ||
cmp.le(False, true).should.equal(true); | ||
cmp.lte(False, true).should.equal(true); | ||
done(); | ||
@@ -610,3 +610,3 @@ }); | ||
test('False() x True()', done => { | ||
cmp.le(False, True).should.equal(true); | ||
cmp.lte(False, True).should.equal(true); | ||
done(); | ||
@@ -617,6 +617,6 @@ }); | ||
suite('les', () => { | ||
suite('ltes', () => { | ||
suite('any => false', () => { | ||
test('true x true', done => { | ||
cmp.les(true, true).should.equal(false); | ||
cmp.ltes(true, true).should.equal(false); | ||
done(); | ||
@@ -634,12 +634,2 @@ }); | ||
test('true x True()', done => { | ||
cmp.id(true, True).should.equal(true); | ||
done(); | ||
}); | ||
test('True() x true', done => { | ||
cmp.id(True, true).should.equal(true); | ||
done(); | ||
}); | ||
test('True() x True()', done => { | ||
@@ -655,12 +645,2 @@ cmp.id(True, True).should.equal(true); | ||
test('false x False()', done => { | ||
cmp.id(false, False).should.equal(true); | ||
done(); | ||
}); | ||
test('False() x false', done => { | ||
cmp.id(False, false).should.equal(true); | ||
done(); | ||
}); | ||
test('False() x False()', done => { | ||
@@ -712,4 +692,24 @@ cmp.id(False, False).should.equal(true); | ||
}); | ||
test('true x True()', done => { | ||
cmp.id(true, True).should.equal(false); | ||
done(); | ||
}); | ||
test('True() x true', done => { | ||
cmp.id(True, true).should.equal(false); | ||
done(); | ||
}); | ||
test('false x False()', done => { | ||
cmp.id(false, False).should.equal(false); | ||
done(); | ||
}); | ||
test('False() x false', done => { | ||
cmp.id(False, false).should.equal(false); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
}); |
@@ -280,3 +280,3 @@ 'use strict'; | ||
suite('ge', () => { | ||
suite('gte', () => { | ||
test('first with self reference => true', done => { | ||
@@ -292,3 +292,3 @@ const first = { | ||
first.mySelf = first; | ||
cmp.ge(first, second).should.equal(true); | ||
cmp.gte(first, second).should.equal(true); | ||
done(); | ||
@@ -307,3 +307,3 @@ }); | ||
second.mySelf = second; | ||
cmp.ge(first, second).should.equal(false); | ||
cmp.gte(first, second).should.equal(false); | ||
done(); | ||
@@ -323,3 +323,3 @@ }); | ||
second.mySelf = second; | ||
cmp.ge(first, second).should.equal(true); | ||
cmp.gte(first, second).should.equal(true); | ||
done(); | ||
@@ -329,3 +329,3 @@ }); | ||
suite('ges', () => { | ||
suite('gtes', () => { | ||
test('first with self reference => true', done => { | ||
@@ -341,3 +341,3 @@ const first = { | ||
first.mySelf = first; | ||
cmp.ges(first, second).should.equal(true); | ||
cmp.gtes(first, second).should.equal(true); | ||
done(); | ||
@@ -356,3 +356,3 @@ }); | ||
second.mySelf = second; | ||
cmp.ges(first, second).should.equal(false); | ||
cmp.gtes(first, second).should.equal(false); | ||
done(); | ||
@@ -372,3 +372,3 @@ }); | ||
second.mySelf = second; | ||
cmp.ges(first, second).should.equal(true); | ||
cmp.gtes(first, second).should.equal(true); | ||
done(); | ||
@@ -468,3 +468,3 @@ }); | ||
suite('le', () => { | ||
suite('lte', () => { | ||
test('first with self reference => false', done => { | ||
@@ -480,3 +480,3 @@ const first = { | ||
first.mySelf = first; | ||
cmp.le(first, second).should.equal(false); | ||
cmp.lte(first, second).should.equal(false); | ||
done(); | ||
@@ -495,3 +495,3 @@ }); | ||
second.mySelf = second; | ||
cmp.le(first, second).should.equal(true); | ||
cmp.lte(first, second).should.equal(true); | ||
done(); | ||
@@ -511,3 +511,3 @@ }); | ||
second.mySelf = second; | ||
cmp.le(first, second).should.equal(true); | ||
cmp.lte(first, second).should.equal(true); | ||
done(); | ||
@@ -517,3 +517,3 @@ }); | ||
suite('les', () => { | ||
suite('ltes', () => { | ||
test('first with self reference => false', done => { | ||
@@ -529,3 +529,3 @@ const first = { | ||
first.mySelf = first; | ||
cmp.les(first, second).should.equal(false); | ||
cmp.ltes(first, second).should.equal(false); | ||
done(); | ||
@@ -544,3 +544,3 @@ }); | ||
second.mySelf = second; | ||
cmp.les(first, second).should.equal(true); | ||
cmp.ltes(first, second).should.equal(true); | ||
done(); | ||
@@ -560,3 +560,3 @@ }); | ||
second.mySelf = second; | ||
cmp.les(first, second).should.equal(true); | ||
cmp.ltes(first, second).should.equal(true); | ||
done(); | ||
@@ -563,0 +563,0 @@ }); |
@@ -159,6 +159,6 @@ 'use strict'; | ||
suite('ge', () => { | ||
suite('gte', () => { | ||
suite('equal => true', () => { | ||
test('function x function', done => { | ||
cmp.ge(f1, f2).should.equal(true); | ||
cmp.gte(f1, f2).should.equal(true); | ||
done(); | ||
@@ -168,3 +168,3 @@ }); | ||
test('Function() x Function()', done => { | ||
cmp.ge(F1, F2).should.equal(true); | ||
cmp.gte(F1, F2).should.equal(true); | ||
done(); | ||
@@ -176,3 +176,3 @@ }); | ||
test('function x function', done => { | ||
cmp.ge(f1, g1).should.equal(false); | ||
cmp.gte(f1, g1).should.equal(false); | ||
done(); | ||
@@ -182,3 +182,3 @@ }); | ||
test('function x Function()', done => { | ||
cmp.ge(f1, F1).should.equal(false); | ||
cmp.gte(f1, F1).should.equal(false); | ||
done(); | ||
@@ -188,3 +188,3 @@ }); | ||
test('Function() x function', done => { | ||
cmp.ge(F1, f1).should.equal(false); | ||
cmp.gte(F1, f1).should.equal(false); | ||
done(); | ||
@@ -194,3 +194,3 @@ }); | ||
test('Function() x Function()', done => { | ||
cmp.ge(F1, G1).should.equal(false); | ||
cmp.gte(F1, G1).should.equal(false); | ||
done(); | ||
@@ -201,6 +201,6 @@ }); | ||
suite('ges', () => { | ||
suite('gtes', () => { | ||
suite('any => false', () => { | ||
test('function x function', done => { | ||
cmp.ges(f1, f1).should.equal(false); | ||
cmp.gtes(f1, f1).should.equal(false); | ||
done(); | ||
@@ -254,6 +254,6 @@ }); | ||
suite('le', () => { | ||
suite('lte', () => { | ||
suite('equal => true', () => { | ||
test('function x function', done => { | ||
cmp.le(f1, f2).should.equal(true); | ||
cmp.lte(f1, f2).should.equal(true); | ||
done(); | ||
@@ -263,3 +263,3 @@ }); | ||
test('Function() x Function()', done => { | ||
cmp.le(F1, F2).should.equal(true); | ||
cmp.lte(F1, F2).should.equal(true); | ||
done(); | ||
@@ -271,3 +271,3 @@ }); | ||
test('function x function', done => { | ||
cmp.le(f1, g1).should.equal(false); | ||
cmp.lte(f1, g1).should.equal(false); | ||
done(); | ||
@@ -277,3 +277,3 @@ }); | ||
test('function x Function()', done => { | ||
cmp.le(f1, F1).should.equal(false); | ||
cmp.lte(f1, F1).should.equal(false); | ||
done(); | ||
@@ -283,3 +283,3 @@ }); | ||
test('Function() x function', done => { | ||
cmp.le(F1, f1).should.equal(false); | ||
cmp.lte(F1, f1).should.equal(false); | ||
done(); | ||
@@ -289,3 +289,3 @@ }); | ||
test('Function() x Function()', done => { | ||
cmp.le(F1, G1).should.equal(false); | ||
cmp.lte(F1, G1).should.equal(false); | ||
done(); | ||
@@ -296,6 +296,6 @@ }); | ||
suite('les', () => { | ||
suite('ltes', () => { | ||
suite('any => false', () => { | ||
test('function x function', done => { | ||
cmp.les(f1, f1).should.equal(false); | ||
cmp.ltes(f1, f1).should.equal(false); | ||
done(); | ||
@@ -302,0 +302,0 @@ }); |
@@ -160,6 +160,6 @@ 'use strict'; | ||
suite('ge', () => { | ||
suite('gte', () => { | ||
suite('any => false', () => { | ||
test('number x string', done => { | ||
cmp.ge(0, '').should.equal(false); | ||
cmp.gte(0, '').should.equal(false); | ||
done(); | ||
@@ -169,3 +169,3 @@ }); | ||
test('number x boolean', done => { | ||
cmp.ge(0, false).should.equal(false); | ||
cmp.gte(0, false).should.equal(false); | ||
done(); | ||
@@ -175,3 +175,3 @@ }); | ||
test('string x boolean', done => { | ||
cmp.ge('', false).should.equal(false); | ||
cmp.gte('', false).should.equal(false); | ||
done(); | ||
@@ -181,3 +181,3 @@ }); | ||
test('function x string', done => { | ||
cmp.ge(fn, fAsString).should.equal(false); | ||
cmp.gte(fn, fAsString).should.equal(false); | ||
done(); | ||
@@ -188,6 +188,6 @@ }); | ||
suite('ges', () => { | ||
suite('gtes', () => { | ||
suite('any => false', () => { | ||
test('number x string', done => { | ||
cmp.ges(0, '').should.equal(false); | ||
cmp.gtes(0, '').should.equal(false); | ||
done(); | ||
@@ -197,3 +197,3 @@ }); | ||
test('number x boolean', done => { | ||
cmp.ges(0, false).should.equal(false); | ||
cmp.gtes(0, false).should.equal(false); | ||
done(); | ||
@@ -203,3 +203,3 @@ }); | ||
test('string x boolean', done => { | ||
cmp.ges('', false).should.equal(false); | ||
cmp.gtes('', false).should.equal(false); | ||
done(); | ||
@@ -209,3 +209,3 @@ }); | ||
test('function x string', done => { | ||
cmp.ges(fn, fAsString).should.equal(false); | ||
cmp.gtes(fn, fAsString).should.equal(false); | ||
done(); | ||
@@ -264,6 +264,6 @@ }); | ||
suite('le', () => { | ||
suite('lte', () => { | ||
suite('any => false', () => { | ||
test('number x string', done => { | ||
cmp.le(0, '').should.equal(false); | ||
cmp.lte(0, '').should.equal(false); | ||
done(); | ||
@@ -273,3 +273,3 @@ }); | ||
test('number x boolean', done => { | ||
cmp.le(0, false).should.equal(false); | ||
cmp.lte(0, false).should.equal(false); | ||
done(); | ||
@@ -279,3 +279,3 @@ }); | ||
test('string x boolean', done => { | ||
cmp.le('', false).should.equal(false); | ||
cmp.lte('', false).should.equal(false); | ||
done(); | ||
@@ -285,3 +285,3 @@ }); | ||
test('function x string', done => { | ||
cmp.le(fn, fAsString).should.equal(false); | ||
cmp.lte(fn, fAsString).should.equal(false); | ||
done(); | ||
@@ -292,6 +292,6 @@ }); | ||
suite('les', () => { | ||
suite('ltes', () => { | ||
suite('any => false', () => { | ||
test('number x string', done => { | ||
cmp.les(0, '').should.equal(false); | ||
cmp.ltes(0, '').should.equal(false); | ||
done(); | ||
@@ -301,3 +301,3 @@ }); | ||
test('number x boolean', done => { | ||
cmp.les(0, false).should.equal(false); | ||
cmp.ltes(0, false).should.equal(false); | ||
done(); | ||
@@ -307,3 +307,3 @@ }); | ||
test('string x boolean', done => { | ||
cmp.les('', false).should.equal(false); | ||
cmp.ltes('', false).should.equal(false); | ||
done(); | ||
@@ -313,3 +313,3 @@ }); | ||
test('function x string', done => { | ||
cmp.les(fn, fAsString).should.equal(false); | ||
cmp.ltes(fn, fAsString).should.equal(false); | ||
done(); | ||
@@ -316,0 +316,0 @@ }); |
@@ -287,6 +287,6 @@ 'use strict'; | ||
suite('ge', () => { | ||
suite('gte', () => { | ||
suite('greater => true', () => { | ||
test('number x number', done => { | ||
cmp.ge(largeNumber, smallNumber).should.equal(true); | ||
cmp.gte(largeNumber, smallNumber).should.equal(true); | ||
done(); | ||
@@ -296,3 +296,3 @@ }); | ||
test('number x Number()', done => { | ||
cmp.ge(largeNumber, SmallNumber).should.equal(true); | ||
cmp.gte(largeNumber, SmallNumber).should.equal(true); | ||
done(); | ||
@@ -302,3 +302,3 @@ }); | ||
test('Number() x number', done => { | ||
cmp.ge(LargeNumber, smallNumber).should.equal(true); | ||
cmp.gte(LargeNumber, smallNumber).should.equal(true); | ||
done(); | ||
@@ -308,3 +308,3 @@ }); | ||
test('Number() x Number()', done => { | ||
cmp.ge(LargeNumber, SmallNumber).should.equal(true); | ||
cmp.gte(LargeNumber, SmallNumber).should.equal(true); | ||
done(); | ||
@@ -316,3 +316,3 @@ }); | ||
test('number x number', done => { | ||
cmp.ge(smallNumber, smallNumber).should.equal(true); | ||
cmp.gte(smallNumber, smallNumber).should.equal(true); | ||
done(); | ||
@@ -322,3 +322,3 @@ }); | ||
test('number x Number()', done => { | ||
cmp.ge(smallNumber, SmallNumber).should.equal(true); | ||
cmp.gte(smallNumber, SmallNumber).should.equal(true); | ||
done(); | ||
@@ -328,3 +328,3 @@ }); | ||
test('Number() x number', done => { | ||
cmp.ge(SmallNumber, smallNumber).should.equal(true); | ||
cmp.gte(SmallNumber, smallNumber).should.equal(true); | ||
done(); | ||
@@ -334,3 +334,3 @@ }); | ||
test('Number() x Number()', done => { | ||
cmp.ge(SmallNumber, SmallNumber).should.equal(true); | ||
cmp.gte(SmallNumber, SmallNumber).should.equal(true); | ||
done(); | ||
@@ -342,3 +342,3 @@ }); | ||
test('number x number', done => { | ||
cmp.ge(smallNumber, largeNumber).should.equal(false); | ||
cmp.gte(smallNumber, largeNumber).should.equal(false); | ||
done(); | ||
@@ -348,3 +348,3 @@ }); | ||
test('number x Number()', done => { | ||
cmp.ge(smallNumber, LargeNumber).should.equal(false); | ||
cmp.gte(smallNumber, LargeNumber).should.equal(false); | ||
done(); | ||
@@ -354,3 +354,3 @@ }); | ||
test('Number() x number', done => { | ||
cmp.ge(SmallNumber, largeNumber).should.equal(false); | ||
cmp.gte(SmallNumber, largeNumber).should.equal(false); | ||
done(); | ||
@@ -360,3 +360,3 @@ }); | ||
test('Number() x Number()', done => { | ||
cmp.ge(SmallNumber, LargeNumber).should.equal(false); | ||
cmp.gte(SmallNumber, LargeNumber).should.equal(false); | ||
done(); | ||
@@ -368,3 +368,3 @@ }); | ||
test('number x isNaN', done => { | ||
cmp.ge(smallNumber, notANumber).should.equal(false); | ||
cmp.gte(smallNumber, notANumber).should.equal(false); | ||
done(); | ||
@@ -374,3 +374,3 @@ }); | ||
test('Number() x isNaN', done => { | ||
cmp.ge(SmallNumber, notANumber).should.equal(false); | ||
cmp.gte(SmallNumber, notANumber).should.equal(false); | ||
done(); | ||
@@ -380,3 +380,3 @@ }); | ||
test('isNaN x isNaN', done => { | ||
cmp.ge(notANumber, notANumber).should.equal(false); | ||
cmp.gte(notANumber, notANumber).should.equal(false); | ||
done(); | ||
@@ -386,3 +386,3 @@ }); | ||
test('isNan x number', done => { | ||
cmp.ge(notANumber, smallNumber).should.equal(false); | ||
cmp.gte(notANumber, smallNumber).should.equal(false); | ||
done(); | ||
@@ -392,3 +392,3 @@ }); | ||
test('isNan x Number()', done => { | ||
cmp.ge(notANumber, SmallNumber).should.equal(false); | ||
cmp.gte(notANumber, SmallNumber).should.equal(false); | ||
done(); | ||
@@ -399,6 +399,6 @@ }); | ||
suite('ges', () => { | ||
suite('gtes', () => { | ||
suite('any => false', () => { | ||
test('number x number', done => { | ||
cmp.ges(smallNumber, smallNumber).should.equal(false); | ||
cmp.gtes(smallNumber, smallNumber).should.equal(false); | ||
done(); | ||
@@ -513,6 +513,6 @@ }); | ||
suite('le', () => { | ||
suite('lte', () => { | ||
suite('greater => false', () => { | ||
test('number x number', done => { | ||
cmp.le(largeNumber, smallNumber).should.equal(false); | ||
cmp.lte(largeNumber, smallNumber).should.equal(false); | ||
done(); | ||
@@ -522,3 +522,3 @@ }); | ||
test('number x Number()', done => { | ||
cmp.le(largeNumber, SmallNumber).should.equal(false); | ||
cmp.lte(largeNumber, SmallNumber).should.equal(false); | ||
done(); | ||
@@ -528,3 +528,3 @@ }); | ||
test('Number() x number', done => { | ||
cmp.le(LargeNumber, smallNumber).should.equal(false); | ||
cmp.lte(LargeNumber, smallNumber).should.equal(false); | ||
done(); | ||
@@ -534,3 +534,3 @@ }); | ||
test('Number() x Number()', done => { | ||
cmp.le(LargeNumber, SmallNumber).should.equal(false); | ||
cmp.lte(LargeNumber, SmallNumber).should.equal(false); | ||
done(); | ||
@@ -542,3 +542,3 @@ }); | ||
test('number x number', done => { | ||
cmp.le(smallNumber, smallNumber).should.equal(true); | ||
cmp.lte(smallNumber, smallNumber).should.equal(true); | ||
done(); | ||
@@ -548,3 +548,3 @@ }); | ||
test('number x Number()', done => { | ||
cmp.le(smallNumber, SmallNumber).should.equal(true); | ||
cmp.lte(smallNumber, SmallNumber).should.equal(true); | ||
done(); | ||
@@ -554,3 +554,3 @@ }); | ||
test('Number() x number', done => { | ||
cmp.le(SmallNumber, smallNumber).should.equal(true); | ||
cmp.lte(SmallNumber, smallNumber).should.equal(true); | ||
done(); | ||
@@ -560,3 +560,3 @@ }); | ||
test('Number() x Number()', done => { | ||
cmp.le(SmallNumber, SmallNumber).should.equal(true); | ||
cmp.lte(SmallNumber, SmallNumber).should.equal(true); | ||
done(); | ||
@@ -568,3 +568,3 @@ }); | ||
test('number x number', done => { | ||
cmp.le(smallNumber, largeNumber).should.equal(true); | ||
cmp.lte(smallNumber, largeNumber).should.equal(true); | ||
done(); | ||
@@ -574,3 +574,3 @@ }); | ||
test('number x Number()', done => { | ||
cmp.le(smallNumber, LargeNumber).should.equal(true); | ||
cmp.lte(smallNumber, LargeNumber).should.equal(true); | ||
done(); | ||
@@ -580,3 +580,3 @@ }); | ||
test('Number() x number', done => { | ||
cmp.le(SmallNumber, largeNumber).should.equal(true); | ||
cmp.lte(SmallNumber, largeNumber).should.equal(true); | ||
done(); | ||
@@ -586,3 +586,3 @@ }); | ||
test('Number() x Number()', done => { | ||
cmp.le(SmallNumber, LargeNumber).should.equal(true); | ||
cmp.lte(SmallNumber, LargeNumber).should.equal(true); | ||
done(); | ||
@@ -594,3 +594,3 @@ }); | ||
test('number x isNaN', done => { | ||
cmp.le(smallNumber, notANumber).should.equal(false); | ||
cmp.lte(smallNumber, notANumber).should.equal(false); | ||
done(); | ||
@@ -600,3 +600,3 @@ }); | ||
test('Number() x isNaN', done => { | ||
cmp.le(SmallNumber, notANumber).should.equal(false); | ||
cmp.lte(SmallNumber, notANumber).should.equal(false); | ||
done(); | ||
@@ -606,3 +606,3 @@ }); | ||
test('isNaN x isNaN', done => { | ||
cmp.le(notANumber, notANumber).should.equal(false); | ||
cmp.lte(notANumber, notANumber).should.equal(false); | ||
done(); | ||
@@ -612,3 +612,3 @@ }); | ||
test('isNan x number', done => { | ||
cmp.le(notANumber, smallNumber).should.equal(false); | ||
cmp.lte(notANumber, smallNumber).should.equal(false); | ||
done(); | ||
@@ -618,3 +618,3 @@ }); | ||
test('isNan x Number()', done => { | ||
cmp.le(notANumber, SmallNumber).should.equal(false); | ||
cmp.lte(notANumber, SmallNumber).should.equal(false); | ||
done(); | ||
@@ -625,6 +625,6 @@ }); | ||
suite('les', () => { | ||
suite('ltes', () => { | ||
suite('any => false', () => { | ||
test('number x number', done => { | ||
cmp.les(smallNumber, smallNumber).should.equal(false); | ||
cmp.ltes(smallNumber, smallNumber).should.equal(false); | ||
done(); | ||
@@ -642,12 +642,2 @@ }); | ||
test('number x Number()', done => { | ||
cmp.id(smallNumber, SmallNumber).should.equal(true); | ||
done(); | ||
}); | ||
test('Number() x number', done => { | ||
cmp.id(SmallNumber, smallNumber).should.equal(true); | ||
done(); | ||
}); | ||
test('Number() x Number()', done => { | ||
@@ -666,3 +656,3 @@ cmp.id(SmallNumber, SmallNumber).should.equal(true); | ||
test('number x Number()', done => { | ||
cmp.id(smallNumber, LargeNumber).should.equal(false); | ||
cmp.id(smallNumber, SmallNumber).should.equal(false); | ||
done(); | ||
@@ -672,3 +662,3 @@ }); | ||
test('Number() x number', done => { | ||
cmp.id(SmallNumber, largeNumber).should.equal(false); | ||
cmp.id(SmallNumber, smallNumber).should.equal(false); | ||
done(); | ||
@@ -675,0 +665,0 @@ }); |
@@ -152,9 +152,4 @@ 'use strict'; | ||
test('null x null', done => { | ||
cmp.eqs(null, null).should.equal(true); | ||
done(); | ||
}); | ||
test('falsy x falsy', done => { | ||
cmp.eqs(r1, r2).should.equal(true); | ||
cmp.eqs(r1, s1).should.equal(true); | ||
done(); | ||
@@ -205,2 +200,7 @@ }); | ||
test('null x null', done => { | ||
cmp.eqs(null, null).should.equal(false); | ||
done(); | ||
}); | ||
test('object x falsy', done => { | ||
@@ -215,7 +215,2 @@ cmp.eqs(q1, r1).should.equal(false); | ||
}); | ||
test('falsy x falsy', done => { | ||
cmp.eqs(r1, s1).should.equal(false); | ||
done(); | ||
}); | ||
}); | ||
@@ -343,3 +338,3 @@ }); | ||
test('falsy x falsy', done => { | ||
cmp.nes(r1, r2).should.equal(false); | ||
cmp.nes(r1, s1).should.equal(false); | ||
done(); | ||
@@ -357,49 +352,44 @@ }); | ||
}); | ||
}); | ||
suite('not equal => true', () => { | ||
test('object x object', done => { | ||
cmp.nes(o1, empty).should.equal(true); | ||
test('object x null', done => { | ||
cmp.nes(o1, null).should.equal(false); | ||
done(); | ||
}); | ||
test('object x Object()', done => { | ||
cmp.nes(o1, Empty).should.equal(true); | ||
test('Object() x null', done => { | ||
cmp.nes(O1, null).should.equal(false); | ||
done(); | ||
}); | ||
test('Object() x object', done => { | ||
cmp.nes(O1, empty).should.equal(true); | ||
test('null x object', done => { | ||
cmp.nes(null, o1).should.equal(false); | ||
done(); | ||
}); | ||
test('Object() x Object()', done => { | ||
cmp.nes(O1, Empty).should.equal(true); | ||
test('null x Object()', done => { | ||
cmp.nes(null, O1).should.equal(false); | ||
done(); | ||
}); | ||
}); | ||
test('object x null', done => { | ||
cmp.nes(o1, null).should.equal(true); | ||
suite('not equal => true', () => { | ||
test('object x object', done => { | ||
cmp.nes(o1, empty).should.equal(true); | ||
done(); | ||
}); | ||
test('Object() x null', done => { | ||
cmp.nes(O1, null).should.equal(true); | ||
test('object x Object()', done => { | ||
cmp.nes(o1, Empty).should.equal(true); | ||
done(); | ||
}); | ||
test('null x object', done => { | ||
cmp.nes(null, o1).should.equal(true); | ||
test('Object() x object', done => { | ||
cmp.nes(O1, empty).should.equal(true); | ||
done(); | ||
}); | ||
test('null x Object()', done => { | ||
cmp.nes(null, O1).should.equal(true); | ||
test('Object() x Object()', done => { | ||
cmp.nes(O1, Empty).should.equal(true); | ||
done(); | ||
}); | ||
test('falsy x falsy', done => { | ||
cmp.nes(r1, s1).should.equal(true); | ||
done(); | ||
}); | ||
}); | ||
@@ -574,12 +564,2 @@ }); | ||
}); | ||
test('object x null', done => { | ||
cmp.gts(o1, null).should.equal(true); | ||
done(); | ||
}); | ||
test('Object() x null', done => { | ||
cmp.gts(O1, null).should.equal(true); | ||
done(); | ||
}); | ||
}); | ||
@@ -634,2 +614,12 @@ | ||
}); | ||
test('object x null', done => { | ||
cmp.gts(o1, null).should.equal(false); | ||
done(); | ||
}); | ||
test('Object() x null', done => { | ||
cmp.gts(O1, null).should.equal(false); | ||
done(); | ||
}); | ||
}); | ||
@@ -670,6 +660,6 @@ | ||
suite('ge', () => { | ||
suite('gte', () => { | ||
suite('greater than => true', () => { | ||
test('object x object', done => { | ||
cmp.ge(t2, t1).should.equal(true); | ||
cmp.gte(t2, t1).should.equal(true); | ||
done(); | ||
@@ -679,3 +669,3 @@ }); | ||
test('object x empty', done => { | ||
cmp.ge(o1, empty).should.equal(true); | ||
cmp.gte(o1, empty).should.equal(true); | ||
done(); | ||
@@ -685,3 +675,3 @@ }); | ||
test('object x Object()', done => { | ||
cmp.ge(o1, Empty).should.equal(true); | ||
cmp.gte(o1, Empty).should.equal(true); | ||
done(); | ||
@@ -691,3 +681,3 @@ }); | ||
test('Object() x object', done => { | ||
cmp.ge(O1, empty).should.equal(true); | ||
cmp.gte(O1, empty).should.equal(true); | ||
done(); | ||
@@ -697,3 +687,3 @@ }); | ||
test('Object() x Object()', done => { | ||
cmp.ge(O1, Empty).should.equal(true); | ||
cmp.gte(O1, Empty).should.equal(true); | ||
done(); | ||
@@ -703,3 +693,3 @@ }); | ||
test('falsy x object', done => { | ||
cmp.ge(r1, empty).should.equal(true); | ||
cmp.gte(r1, empty).should.equal(true); | ||
done(); | ||
@@ -711,3 +701,3 @@ }); | ||
test('object x object', done => { | ||
cmp.ge(o1, o2).should.equal(true); | ||
cmp.gte(o1, o2).should.equal(true); | ||
done(); | ||
@@ -717,3 +707,3 @@ }); | ||
test('object x Object()', done => { | ||
cmp.ge(o1, O1).should.equal(true); | ||
cmp.gte(o1, O1).should.equal(true); | ||
done(); | ||
@@ -723,3 +713,3 @@ }); | ||
test('Object() x object', done => { | ||
cmp.ge(O1, o1).should.equal(true); | ||
cmp.gte(O1, o1).should.equal(true); | ||
done(); | ||
@@ -729,3 +719,3 @@ }); | ||
test('Object() x Object()', done => { | ||
cmp.ge(O1, O2).should.equal(true); | ||
cmp.gte(O1, O2).should.equal(true); | ||
done(); | ||
@@ -735,3 +725,3 @@ }); | ||
test('null x null', done => { | ||
cmp.ge(null, null).should.equal(true); | ||
cmp.gte(null, null).should.equal(true); | ||
done(); | ||
@@ -741,3 +731,3 @@ }); | ||
test('falsy x falsy', done => { | ||
cmp.ge(r1, r1).should.equal(true); | ||
cmp.gte(r1, r1).should.equal(true); | ||
done(); | ||
@@ -749,3 +739,3 @@ }); | ||
test('object x object', done => { | ||
cmp.ge(o1, p1).should.equal(false); | ||
cmp.gte(o1, p1).should.equal(false); | ||
done(); | ||
@@ -755,3 +745,3 @@ }); | ||
test('object x Object()', done => { | ||
cmp.ge(o1, P1).should.equal(false); | ||
cmp.gte(o1, P1).should.equal(false); | ||
done(); | ||
@@ -761,3 +751,3 @@ }); | ||
test('Object() x object', done => { | ||
cmp.ge(O1, p1).should.equal(false); | ||
cmp.gte(O1, p1).should.equal(false); | ||
done(); | ||
@@ -767,3 +757,3 @@ }); | ||
test('Object() x Object()', done => { | ||
cmp.ge(O1, P1).should.equal(false); | ||
cmp.gte(O1, P1).should.equal(false); | ||
done(); | ||
@@ -773,3 +763,3 @@ }); | ||
test('object x null', done => { | ||
cmp.ge(o1, null).should.equal(false); | ||
cmp.gte(o1, null).should.equal(false); | ||
done(); | ||
@@ -779,3 +769,3 @@ }); | ||
test('Object() x null', done => { | ||
cmp.ge(O1, null).should.equal(false); | ||
cmp.gte(O1, null).should.equal(false); | ||
done(); | ||
@@ -785,3 +775,3 @@ }); | ||
test('null x object', done => { | ||
cmp.ge(null, o1).should.equal(false); | ||
cmp.gte(null, o1).should.equal(false); | ||
done(); | ||
@@ -791,3 +781,3 @@ }); | ||
test('null x Object()', done => { | ||
cmp.ge(null, O1).should.equal(false); | ||
cmp.gte(null, O1).should.equal(false); | ||
done(); | ||
@@ -797,3 +787,3 @@ }); | ||
test('null x falsy', done => { | ||
cmp.ge(null, r1).should.equal(false); | ||
cmp.gte(null, r1).should.equal(false); | ||
done(); | ||
@@ -803,3 +793,3 @@ }); | ||
test('falsy x null', done => { | ||
cmp.ge(r1, null).should.equal(false); | ||
cmp.gte(r1, null).should.equal(false); | ||
done(); | ||
@@ -809,3 +799,3 @@ }); | ||
test('object x falsy', done => { | ||
cmp.ge(o1, r1).should.equal(false); | ||
cmp.gte(o1, r1).should.equal(false); | ||
done(); | ||
@@ -815,3 +805,3 @@ }); | ||
test('falsy x object', done => { | ||
cmp.ge(r1, o1).should.equal(false); | ||
cmp.gte(r1, o1).should.equal(false); | ||
done(); | ||
@@ -823,3 +813,3 @@ }); | ||
test('object x object', done => { | ||
cmp.ge(t1, t2).should.equal(false); | ||
cmp.gte(t1, t2).should.equal(false); | ||
done(); | ||
@@ -829,3 +819,3 @@ }); | ||
test('empty x object', done => { | ||
cmp.ge(empty, o1).should.equal(false); | ||
cmp.gte(empty, o1).should.equal(false); | ||
done(); | ||
@@ -835,3 +825,3 @@ }); | ||
test('object x Object()', done => { | ||
cmp.ge(Empty, o1).should.equal(false); | ||
cmp.gte(Empty, o1).should.equal(false); | ||
done(); | ||
@@ -841,3 +831,3 @@ }); | ||
test('Object() x object', done => { | ||
cmp.ge(empty, O1).should.equal(false); | ||
cmp.gte(empty, O1).should.equal(false); | ||
done(); | ||
@@ -847,3 +837,3 @@ }); | ||
test('Object() x Object()', done => { | ||
cmp.ge(Empty, O1).should.equal(false); | ||
cmp.gte(Empty, O1).should.equal(false); | ||
done(); | ||
@@ -853,3 +843,3 @@ }); | ||
test('object x falsy', done => { | ||
cmp.ge(empty, r1).should.equal(false); | ||
cmp.gte(empty, r1).should.equal(false); | ||
done(); | ||
@@ -860,6 +850,6 @@ }); | ||
suite('ges', () => { | ||
suite('gtes', () => { | ||
suite('greater than => true', () => { | ||
test('object x object', done => { | ||
cmp.ges(o1, empty).should.equal(true); | ||
cmp.gtes(o1, empty).should.equal(true); | ||
done(); | ||
@@ -869,3 +859,3 @@ }); | ||
test('object x Object()', done => { | ||
cmp.ges(o1, Empty).should.equal(true); | ||
cmp.gtes(o1, Empty).should.equal(true); | ||
done(); | ||
@@ -875,3 +865,3 @@ }); | ||
test('Object() x object', done => { | ||
cmp.ges(O1, empty).should.equal(true); | ||
cmp.gtes(O1, empty).should.equal(true); | ||
done(); | ||
@@ -881,15 +871,5 @@ }); | ||
test('Object() x Object()', done => { | ||
cmp.ges(O1, Empty).should.equal(true); | ||
cmp.gtes(O1, Empty).should.equal(true); | ||
done(); | ||
}); | ||
test('object x null', done => { | ||
cmp.ges(o1, null).should.equal(true); | ||
done(); | ||
}); | ||
test('Object() x null', done => { | ||
cmp.ges(O1, null).should.equal(true); | ||
done(); | ||
}); | ||
}); | ||
@@ -899,3 +879,3 @@ | ||
test('object x object', done => { | ||
cmp.ges(o1, o2).should.equal(true); | ||
cmp.gtes(o1, o2).should.equal(true); | ||
done(); | ||
@@ -905,3 +885,3 @@ }); | ||
test('object x Object()', done => { | ||
cmp.ges(o1, O1).should.equal(true); | ||
cmp.gtes(o1, O1).should.equal(true); | ||
done(); | ||
@@ -911,3 +891,3 @@ }); | ||
test('Object() x object', done => { | ||
cmp.ges(O1, o1).should.equal(true); | ||
cmp.gtes(O1, o1).should.equal(true); | ||
done(); | ||
@@ -917,10 +897,5 @@ }); | ||
test('Object() x Object()', done => { | ||
cmp.ges(O1, O2).should.equal(true); | ||
cmp.gtes(O1, O2).should.equal(true); | ||
done(); | ||
}); | ||
test('null x null', done => { | ||
cmp.ges(null, null).should.equal(true); | ||
done(); | ||
}); | ||
}); | ||
@@ -930,3 +905,3 @@ | ||
test('object x object', done => { | ||
cmp.ges(o1, q1).should.equal(false); | ||
cmp.gtes(o1, q1).should.equal(false); | ||
done(); | ||
@@ -936,3 +911,3 @@ }); | ||
test('object x Object()', done => { | ||
cmp.ges(o1, Q1).should.equal(false); | ||
cmp.gtes(o1, Q1).should.equal(false); | ||
done(); | ||
@@ -942,3 +917,3 @@ }); | ||
test('Object() x object', done => { | ||
cmp.ges(O1, q1).should.equal(false); | ||
cmp.gtes(O1, q1).should.equal(false); | ||
done(); | ||
@@ -948,5 +923,20 @@ }); | ||
test('Object() x Object()', done => { | ||
cmp.ges(O1, Q1).should.equal(false); | ||
cmp.gtes(O1, Q1).should.equal(false); | ||
done(); | ||
}); | ||
test('object x null', done => { | ||
cmp.gtes(o1, null).should.equal(false); | ||
done(); | ||
}); | ||
test('Object() x null', done => { | ||
cmp.gtes(O1, null).should.equal(false); | ||
done(); | ||
}); | ||
test('null x null', done => { | ||
cmp.gtes(null, null).should.equal(false); | ||
done(); | ||
}); | ||
}); | ||
@@ -956,3 +946,3 @@ | ||
test('object x object', done => { | ||
cmp.ges(empty, o1).should.equal(false); | ||
cmp.gtes(empty, o1).should.equal(false); | ||
done(); | ||
@@ -962,3 +952,3 @@ }); | ||
test('object x Object()', done => { | ||
cmp.ges(Empty, o1).should.equal(false); | ||
cmp.gtes(Empty, o1).should.equal(false); | ||
done(); | ||
@@ -968,3 +958,3 @@ }); | ||
test('Object() x object', done => { | ||
cmp.ges(empty, O1).should.equal(false); | ||
cmp.gtes(empty, O1).should.equal(false); | ||
done(); | ||
@@ -974,3 +964,3 @@ }); | ||
test('Object() x Object()', done => { | ||
cmp.ges(Empty, O1).should.equal(false); | ||
cmp.gtes(Empty, O1).should.equal(false); | ||
done(); | ||
@@ -980,3 +970,3 @@ }); | ||
test('null x object', done => { | ||
cmp.ges(null, o1).should.equal(false); | ||
cmp.gtes(null, o1).should.equal(false); | ||
done(); | ||
@@ -986,3 +976,3 @@ }); | ||
test('null x Object()', done => { | ||
cmp.ges(null, O1).should.equal(false); | ||
cmp.gtes(null, O1).should.equal(false); | ||
done(); | ||
@@ -1218,2 +1208,12 @@ }); | ||
}); | ||
test('null x object', done => { | ||
cmp.lts(null, o1).should.equal(false); | ||
done(); | ||
}); | ||
test('null x Object()', done => { | ||
cmp.lts(null, O1).should.equal(false); | ||
done(); | ||
}); | ||
}); | ||
@@ -1241,19 +1241,9 @@ | ||
}); | ||
test('null x object', done => { | ||
cmp.lts(null, o1).should.equal(true); | ||
done(); | ||
}); | ||
test('null x Object()', done => { | ||
cmp.lts(null, O1).should.equal(true); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
suite('le', () => { | ||
suite('lte', () => { | ||
suite('greater than => false', () => { | ||
test('object x object', done => { | ||
cmp.le(t2, t1).should.equal(false); | ||
cmp.lte(t2, t1).should.equal(false); | ||
done(); | ||
@@ -1263,3 +1253,3 @@ }); | ||
test('object x empty', done => { | ||
cmp.le(o1, empty).should.equal(false); | ||
cmp.lte(o1, empty).should.equal(false); | ||
done(); | ||
@@ -1269,3 +1259,3 @@ }); | ||
test('object x Object()', done => { | ||
cmp.le(o1, Empty).should.equal(false); | ||
cmp.lte(o1, Empty).should.equal(false); | ||
done(); | ||
@@ -1275,3 +1265,3 @@ }); | ||
test('Object() x object', done => { | ||
cmp.le(O1, empty).should.equal(false); | ||
cmp.lte(O1, empty).should.equal(false); | ||
done(); | ||
@@ -1281,3 +1271,3 @@ }); | ||
test('Object() x Object()', done => { | ||
cmp.le(O1, Empty).should.equal(false); | ||
cmp.lte(O1, Empty).should.equal(false); | ||
done(); | ||
@@ -1287,3 +1277,3 @@ }); | ||
test('falsy x object', done => { | ||
cmp.le(r1, empty).should.equal(false); | ||
cmp.lte(r1, empty).should.equal(false); | ||
done(); | ||
@@ -1295,3 +1285,3 @@ }); | ||
test('object x object', done => { | ||
cmp.le(o1, o2).should.equal(true); | ||
cmp.lte(o1, o2).should.equal(true); | ||
done(); | ||
@@ -1301,3 +1291,3 @@ }); | ||
test('object x Object()', done => { | ||
cmp.le(o1, O1).should.equal(true); | ||
cmp.lte(o1, O1).should.equal(true); | ||
done(); | ||
@@ -1307,3 +1297,3 @@ }); | ||
test('Object() x object', done => { | ||
cmp.le(O1, o1).should.equal(true); | ||
cmp.lte(O1, o1).should.equal(true); | ||
done(); | ||
@@ -1313,3 +1303,3 @@ }); | ||
test('Object() x Object()', done => { | ||
cmp.le(O1, O2).should.equal(true); | ||
cmp.lte(O1, O2).should.equal(true); | ||
done(); | ||
@@ -1319,3 +1309,3 @@ }); | ||
test('null x null', done => { | ||
cmp.le(null, null).should.equal(true); | ||
cmp.lte(null, null).should.equal(true); | ||
done(); | ||
@@ -1325,3 +1315,3 @@ }); | ||
test('falsy x falsy', done => { | ||
cmp.le(r1, r1).should.equal(true); | ||
cmp.lte(r1, r1).should.equal(true); | ||
done(); | ||
@@ -1333,3 +1323,3 @@ }); | ||
test('object x object', done => { | ||
cmp.le(o1, p1).should.equal(false); | ||
cmp.lte(o1, p1).should.equal(false); | ||
done(); | ||
@@ -1339,3 +1329,3 @@ }); | ||
test('object x Object()', done => { | ||
cmp.le(o1, P1).should.equal(false); | ||
cmp.lte(o1, P1).should.equal(false); | ||
done(); | ||
@@ -1345,3 +1335,3 @@ }); | ||
test('Object() x object', done => { | ||
cmp.le(O1, p1).should.equal(false); | ||
cmp.lte(O1, p1).should.equal(false); | ||
done(); | ||
@@ -1351,3 +1341,3 @@ }); | ||
test('Object() x Object()', done => { | ||
cmp.le(O1, P1).should.equal(false); | ||
cmp.lte(O1, P1).should.equal(false); | ||
done(); | ||
@@ -1357,3 +1347,3 @@ }); | ||
test('object x null', done => { | ||
cmp.le(o1, null).should.equal(false); | ||
cmp.lte(o1, null).should.equal(false); | ||
done(); | ||
@@ -1363,3 +1353,3 @@ }); | ||
test('Object() x null', done => { | ||
cmp.le(O1, null).should.equal(false); | ||
cmp.lte(O1, null).should.equal(false); | ||
done(); | ||
@@ -1369,3 +1359,3 @@ }); | ||
test('null x object', done => { | ||
cmp.le(null, o1).should.equal(false); | ||
cmp.lte(null, o1).should.equal(false); | ||
done(); | ||
@@ -1375,3 +1365,3 @@ }); | ||
test('null x Object()', done => { | ||
cmp.le(null, O1).should.equal(false); | ||
cmp.lte(null, O1).should.equal(false); | ||
done(); | ||
@@ -1381,3 +1371,3 @@ }); | ||
test('null x falsy', done => { | ||
cmp.le(null, r1).should.equal(false); | ||
cmp.lte(null, r1).should.equal(false); | ||
done(); | ||
@@ -1387,3 +1377,3 @@ }); | ||
test('falsy x null', done => { | ||
cmp.le(r1, null).should.equal(false); | ||
cmp.lte(r1, null).should.equal(false); | ||
done(); | ||
@@ -1393,3 +1383,3 @@ }); | ||
test('object x falsy', done => { | ||
cmp.le(o1, r1).should.equal(false); | ||
cmp.lte(o1, r1).should.equal(false); | ||
done(); | ||
@@ -1399,3 +1389,3 @@ }); | ||
test('falsy x object', done => { | ||
cmp.le(r1, o1).should.equal(false); | ||
cmp.lte(r1, o1).should.equal(false); | ||
done(); | ||
@@ -1407,3 +1397,3 @@ }); | ||
test('object x object', done => { | ||
cmp.le(t1, t2).should.equal(true); | ||
cmp.lte(t1, t2).should.equal(true); | ||
done(); | ||
@@ -1413,3 +1403,3 @@ }); | ||
test('empty x object', done => { | ||
cmp.le(empty, o1).should.equal(true); | ||
cmp.lte(empty, o1).should.equal(true); | ||
done(); | ||
@@ -1419,3 +1409,3 @@ }); | ||
test('object x Object()', done => { | ||
cmp.le(Empty, o1).should.equal(true); | ||
cmp.lte(Empty, o1).should.equal(true); | ||
done(); | ||
@@ -1425,3 +1415,3 @@ }); | ||
test('Object() x object', done => { | ||
cmp.le(empty, O1).should.equal(true); | ||
cmp.lte(empty, O1).should.equal(true); | ||
done(); | ||
@@ -1431,3 +1421,3 @@ }); | ||
test('Object() x Object()', done => { | ||
cmp.le(Empty, O1).should.equal(true); | ||
cmp.lte(Empty, O1).should.equal(true); | ||
done(); | ||
@@ -1437,3 +1427,3 @@ }); | ||
test('object x falsy', done => { | ||
cmp.le(empty, r1).should.equal(true); | ||
cmp.lte(empty, r1).should.equal(true); | ||
done(); | ||
@@ -1444,6 +1434,6 @@ }); | ||
suite('les', () => { | ||
suite('ltes', () => { | ||
suite('greater than => false', () => { | ||
test('object x object', done => { | ||
cmp.les(o1, empty).should.equal(false); | ||
cmp.ltes(o1, empty).should.equal(false); | ||
done(); | ||
@@ -1453,3 +1443,3 @@ }); | ||
test('object x Object()', done => { | ||
cmp.les(o1, Empty).should.equal(false); | ||
cmp.ltes(o1, Empty).should.equal(false); | ||
done(); | ||
@@ -1459,3 +1449,3 @@ }); | ||
test('Object() x object', done => { | ||
cmp.les(O1, empty).should.equal(false); | ||
cmp.ltes(O1, empty).should.equal(false); | ||
done(); | ||
@@ -1465,3 +1455,3 @@ }); | ||
test('Object() x Object()', done => { | ||
cmp.les(O1, Empty).should.equal(false); | ||
cmp.ltes(O1, Empty).should.equal(false); | ||
done(); | ||
@@ -1471,3 +1461,3 @@ }); | ||
test('object x null', done => { | ||
cmp.les(o1, null).should.equal(false); | ||
cmp.ltes(o1, null).should.equal(false); | ||
done(); | ||
@@ -1477,3 +1467,3 @@ }); | ||
test('Object() x null', done => { | ||
cmp.les(O1, null).should.equal(false); | ||
cmp.ltes(O1, null).should.equal(false); | ||
done(); | ||
@@ -1485,3 +1475,3 @@ }); | ||
test('object x object', done => { | ||
cmp.les(o1, o2).should.equal(true); | ||
cmp.ltes(o1, o2).should.equal(true); | ||
done(); | ||
@@ -1491,3 +1481,3 @@ }); | ||
test('object x Object()', done => { | ||
cmp.les(o1, O1).should.equal(true); | ||
cmp.ltes(o1, O1).should.equal(true); | ||
done(); | ||
@@ -1497,3 +1487,3 @@ }); | ||
test('Object() x object', done => { | ||
cmp.les(O1, o1).should.equal(true); | ||
cmp.ltes(O1, o1).should.equal(true); | ||
done(); | ||
@@ -1503,10 +1493,5 @@ }); | ||
test('Object() x Object()', done => { | ||
cmp.les(O1, O2).should.equal(true); | ||
cmp.ltes(O1, O2).should.equal(true); | ||
done(); | ||
}); | ||
test('null x null', done => { | ||
cmp.les(null, null).should.equal(true); | ||
done(); | ||
}); | ||
}); | ||
@@ -1516,3 +1501,3 @@ | ||
test('object x object', done => { | ||
cmp.les(o1, q1).should.equal(false); | ||
cmp.ltes(o1, q1).should.equal(false); | ||
done(); | ||
@@ -1522,3 +1507,3 @@ }); | ||
test('object x Object()', done => { | ||
cmp.les(o1, Q1).should.equal(false); | ||
cmp.ltes(o1, Q1).should.equal(false); | ||
done(); | ||
@@ -1528,3 +1513,3 @@ }); | ||
test('Object() x object', done => { | ||
cmp.les(O1, q1).should.equal(false); | ||
cmp.ltes(O1, q1).should.equal(false); | ||
done(); | ||
@@ -1534,5 +1519,20 @@ }); | ||
test('Object() x Object()', done => { | ||
cmp.les(O1, Q1).should.equal(false); | ||
cmp.ltes(O1, Q1).should.equal(false); | ||
done(); | ||
}); | ||
test('null x null', done => { | ||
cmp.ltes(null, null).should.equal(false); | ||
done(); | ||
}); | ||
test('null x object', done => { | ||
cmp.ltes(null, o1).should.equal(false); | ||
done(); | ||
}); | ||
test('null x Object()', done => { | ||
cmp.ltes(null, O1).should.equal(false); | ||
done(); | ||
}); | ||
}); | ||
@@ -1542,3 +1542,3 @@ | ||
test('object x object', done => { | ||
cmp.les(empty, o1).should.equal(true); | ||
cmp.ltes(empty, o1).should.equal(true); | ||
done(); | ||
@@ -1548,3 +1548,3 @@ }); | ||
test('object x Object()', done => { | ||
cmp.les(Empty, o1).should.equal(true); | ||
cmp.ltes(Empty, o1).should.equal(true); | ||
done(); | ||
@@ -1554,3 +1554,3 @@ }); | ||
test('Object() x object', done => { | ||
cmp.les(empty, O1).should.equal(true); | ||
cmp.ltes(empty, O1).should.equal(true); | ||
done(); | ||
@@ -1560,15 +1560,5 @@ }); | ||
test('Object() x Object()', done => { | ||
cmp.les(Empty, O1).should.equal(true); | ||
cmp.ltes(Empty, O1).should.equal(true); | ||
done(); | ||
}); | ||
test('null x object', done => { | ||
cmp.les(null, o1).should.equal(true); | ||
done(); | ||
}); | ||
test('null x Object()', done => { | ||
cmp.les(null, O1).should.equal(true); | ||
done(); | ||
}); | ||
}); | ||
@@ -1575,0 +1565,0 @@ }); |
@@ -387,6 +387,6 @@ 'use strict'; | ||
suite('ge', () => { | ||
suite('gte', () => { | ||
suite('greater => true', () => { | ||
test('string x string', done => { | ||
cmp.ge(foo, bar).should.equal(true); | ||
cmp.gte(foo, bar).should.equal(true); | ||
done(); | ||
@@ -396,3 +396,3 @@ }); | ||
test('string x String()', done => { | ||
cmp.ge(foo, Bar).should.equal(true); | ||
cmp.gte(foo, Bar).should.equal(true); | ||
done(); | ||
@@ -402,3 +402,3 @@ }); | ||
test('String() x string', done => { | ||
cmp.ge(Foo, bar).should.equal(true); | ||
cmp.gte(Foo, bar).should.equal(true); | ||
done(); | ||
@@ -408,3 +408,3 @@ }); | ||
test('String() x String()', done => { | ||
cmp.ge(Foo, Bar).should.equal(true); | ||
cmp.gte(Foo, Bar).should.equal(true); | ||
done(); | ||
@@ -414,3 +414,3 @@ }); | ||
test('string x empty', done => { | ||
cmp.ge(foo, empty).should.equal(true); | ||
cmp.gte(foo, empty).should.equal(true); | ||
done(); | ||
@@ -420,3 +420,3 @@ }); | ||
test('string x Empty()', done => { | ||
cmp.ge(foo, Empty).should.equal(true); | ||
cmp.gte(foo, Empty).should.equal(true); | ||
done(); | ||
@@ -426,3 +426,3 @@ }); | ||
test('String() x empty', done => { | ||
cmp.ge(Foo, empty).should.equal(true); | ||
cmp.gte(Foo, empty).should.equal(true); | ||
done(); | ||
@@ -432,3 +432,3 @@ }); | ||
test('String() x Empty()', done => { | ||
cmp.ge(Foo, Empty).should.equal(true); | ||
cmp.gte(Foo, Empty).should.equal(true); | ||
done(); | ||
@@ -440,3 +440,3 @@ }); | ||
test('string x string', done => { | ||
cmp.ge(foo, foo).should.equal(true); | ||
cmp.gte(foo, foo).should.equal(true); | ||
done(); | ||
@@ -446,3 +446,3 @@ }); | ||
test('string x String()', done => { | ||
cmp.ge(foo, Foo).should.equal(true); | ||
cmp.gte(foo, Foo).should.equal(true); | ||
done(); | ||
@@ -452,3 +452,3 @@ }); | ||
test('String() x string', done => { | ||
cmp.ge(Foo, foo).should.equal(true); | ||
cmp.gte(Foo, foo).should.equal(true); | ||
done(); | ||
@@ -458,3 +458,3 @@ }); | ||
test('String() x String()', done => { | ||
cmp.ge(Foo, Foo).should.equal(true); | ||
cmp.gte(Foo, Foo).should.equal(true); | ||
done(); | ||
@@ -464,3 +464,3 @@ }); | ||
test('empty x empty', done => { | ||
cmp.ge(empty, empty).should.equal(true); | ||
cmp.gte(empty, empty).should.equal(true); | ||
done(); | ||
@@ -470,3 +470,3 @@ }); | ||
test('empty x Empty()', done => { | ||
cmp.ge(empty, Empty).should.equal(true); | ||
cmp.gte(empty, Empty).should.equal(true); | ||
done(); | ||
@@ -476,3 +476,3 @@ }); | ||
test('Empty() x empty', done => { | ||
cmp.ge(Empty, empty).should.equal(true); | ||
cmp.gte(Empty, empty).should.equal(true); | ||
done(); | ||
@@ -482,3 +482,3 @@ }); | ||
test('Empty() x Empty()', done => { | ||
cmp.ge(Empty, Empty).should.equal(true); | ||
cmp.gte(Empty, Empty).should.equal(true); | ||
done(); | ||
@@ -490,3 +490,3 @@ }); | ||
test('string x string', done => { | ||
cmp.ge(bar, foo).should.equal(false); | ||
cmp.gte(bar, foo).should.equal(false); | ||
done(); | ||
@@ -496,3 +496,3 @@ }); | ||
test('string x String()', done => { | ||
cmp.ge(bar, Foo).should.equal(false); | ||
cmp.gte(bar, Foo).should.equal(false); | ||
done(); | ||
@@ -502,3 +502,3 @@ }); | ||
test('String() x string', done => { | ||
cmp.ge(Bar, foo).should.equal(false); | ||
cmp.gte(Bar, foo).should.equal(false); | ||
done(); | ||
@@ -508,3 +508,3 @@ }); | ||
test('String() x String()', done => { | ||
cmp.ge(Bar, Foo).should.equal(false); | ||
cmp.gte(Bar, Foo).should.equal(false); | ||
done(); | ||
@@ -514,3 +514,3 @@ }); | ||
test('empty x string', done => { | ||
cmp.ge(empty, foo).should.equal(false); | ||
cmp.gte(empty, foo).should.equal(false); | ||
done(); | ||
@@ -520,3 +520,3 @@ }); | ||
test('empty x String()', done => { | ||
cmp.ge(empty, Foo).should.equal(false); | ||
cmp.gte(empty, Foo).should.equal(false); | ||
done(); | ||
@@ -526,3 +526,3 @@ }); | ||
test('Empty() x string', done => { | ||
cmp.ge(Empty, foo).should.equal(false); | ||
cmp.gte(Empty, foo).should.equal(false); | ||
done(); | ||
@@ -532,3 +532,3 @@ }); | ||
test('Empty() x String()', done => { | ||
cmp.ge(Empty, Foo).should.equal(false); | ||
cmp.gte(Empty, Foo).should.equal(false); | ||
done(); | ||
@@ -539,6 +539,6 @@ }); | ||
suite('ges', () => { | ||
suite('gtes', () => { | ||
suite('any => false', () => { | ||
test('string x string', done => { | ||
cmp.ges(foo, foo).should.equal(false); | ||
cmp.gtes(foo, foo).should.equal(false); | ||
done(); | ||
@@ -686,6 +686,6 @@ }); | ||
suite('le', () => { | ||
suite('lte', () => { | ||
suite('greater => false', () => { | ||
test('string x string', done => { | ||
cmp.le(foo, bar).should.equal(false); | ||
cmp.lte(foo, bar).should.equal(false); | ||
done(); | ||
@@ -695,3 +695,3 @@ }); | ||
test('string x String()', done => { | ||
cmp.le(foo, Bar).should.equal(false); | ||
cmp.lte(foo, Bar).should.equal(false); | ||
done(); | ||
@@ -701,3 +701,3 @@ }); | ||
test('String() x string', done => { | ||
cmp.le(Foo, bar).should.equal(false); | ||
cmp.lte(Foo, bar).should.equal(false); | ||
done(); | ||
@@ -707,3 +707,3 @@ }); | ||
test('String() x String()', done => { | ||
cmp.le(Foo, Bar).should.equal(false); | ||
cmp.lte(Foo, Bar).should.equal(false); | ||
done(); | ||
@@ -713,3 +713,3 @@ }); | ||
test('string x empty', done => { | ||
cmp.le(foo, empty).should.equal(false); | ||
cmp.lte(foo, empty).should.equal(false); | ||
done(); | ||
@@ -719,3 +719,3 @@ }); | ||
test('string x Empty()', done => { | ||
cmp.le(foo, Empty).should.equal(false); | ||
cmp.lte(foo, Empty).should.equal(false); | ||
done(); | ||
@@ -725,3 +725,3 @@ }); | ||
test('String() x empty', done => { | ||
cmp.le(Foo, empty).should.equal(false); | ||
cmp.lte(Foo, empty).should.equal(false); | ||
done(); | ||
@@ -731,3 +731,3 @@ }); | ||
test('String() x Empty()', done => { | ||
cmp.le(Foo, Empty).should.equal(false); | ||
cmp.lte(Foo, Empty).should.equal(false); | ||
done(); | ||
@@ -739,3 +739,3 @@ }); | ||
test('string x string', done => { | ||
cmp.le(foo, foo).should.equal(true); | ||
cmp.lte(foo, foo).should.equal(true); | ||
done(); | ||
@@ -745,3 +745,3 @@ }); | ||
test('string x String()', done => { | ||
cmp.le(foo, Foo).should.equal(true); | ||
cmp.lte(foo, Foo).should.equal(true); | ||
done(); | ||
@@ -751,3 +751,3 @@ }); | ||
test('String() x string', done => { | ||
cmp.le(Foo, foo).should.equal(true); | ||
cmp.lte(Foo, foo).should.equal(true); | ||
done(); | ||
@@ -757,3 +757,3 @@ }); | ||
test('String() x String()', done => { | ||
cmp.le(Foo, Foo).should.equal(true); | ||
cmp.lte(Foo, Foo).should.equal(true); | ||
done(); | ||
@@ -763,3 +763,3 @@ }); | ||
test('empty x empty', done => { | ||
cmp.le(empty, empty).should.equal(true); | ||
cmp.lte(empty, empty).should.equal(true); | ||
done(); | ||
@@ -769,3 +769,3 @@ }); | ||
test('empty x Empty()', done => { | ||
cmp.le(empty, Empty).should.equal(true); | ||
cmp.lte(empty, Empty).should.equal(true); | ||
done(); | ||
@@ -775,3 +775,3 @@ }); | ||
test('Empty() x empty', done => { | ||
cmp.le(Empty, empty).should.equal(true); | ||
cmp.lte(Empty, empty).should.equal(true); | ||
done(); | ||
@@ -781,3 +781,3 @@ }); | ||
test('Empty() x Empty()', done => { | ||
cmp.le(Empty, Empty).should.equal(true); | ||
cmp.lte(Empty, Empty).should.equal(true); | ||
done(); | ||
@@ -789,3 +789,3 @@ }); | ||
test('string x string', done => { | ||
cmp.le(bar, foo).should.equal(true); | ||
cmp.lte(bar, foo).should.equal(true); | ||
done(); | ||
@@ -795,3 +795,3 @@ }); | ||
test('string x String()', done => { | ||
cmp.le(bar, Foo).should.equal(true); | ||
cmp.lte(bar, Foo).should.equal(true); | ||
done(); | ||
@@ -801,3 +801,3 @@ }); | ||
test('String() x string', done => { | ||
cmp.le(Bar, foo).should.equal(true); | ||
cmp.lte(Bar, foo).should.equal(true); | ||
done(); | ||
@@ -807,3 +807,3 @@ }); | ||
test('String() x String()', done => { | ||
cmp.le(Bar, Foo).should.equal(true); | ||
cmp.lte(Bar, Foo).should.equal(true); | ||
done(); | ||
@@ -813,3 +813,3 @@ }); | ||
test('empty x string', done => { | ||
cmp.le(empty, foo).should.equal(true); | ||
cmp.lte(empty, foo).should.equal(true); | ||
done(); | ||
@@ -819,3 +819,3 @@ }); | ||
test('empty x String()', done => { | ||
cmp.le(empty, Foo).should.equal(true); | ||
cmp.lte(empty, Foo).should.equal(true); | ||
done(); | ||
@@ -825,3 +825,3 @@ }); | ||
test('Empty() x string', done => { | ||
cmp.le(Empty, foo).should.equal(true); | ||
cmp.lte(Empty, foo).should.equal(true); | ||
done(); | ||
@@ -831,3 +831,3 @@ }); | ||
test('Empty() x String()', done => { | ||
cmp.le(Empty, Foo).should.equal(true); | ||
cmp.lte(Empty, Foo).should.equal(true); | ||
done(); | ||
@@ -838,6 +838,6 @@ }); | ||
suite('les', () => { | ||
suite('ltes', () => { | ||
suite('any => false', () => { | ||
test('string x string', done => { | ||
cmp.les(foo, foo).should.equal(false); | ||
cmp.ltes(foo, foo).should.equal(false); | ||
done(); | ||
@@ -855,12 +855,2 @@ }); | ||
test('string x String()', done => { | ||
cmp.id(foo, Foo).should.equal(true); | ||
done(); | ||
}); | ||
test('String() x string', done => { | ||
cmp.id(Foo, foo).should.equal(true); | ||
done(); | ||
}); | ||
test('String() x String()', done => { | ||
@@ -876,12 +866,2 @@ cmp.id(Foo, Foo).should.equal(true); | ||
test('empty x Empty()', done => { | ||
cmp.id(empty, Empty).should.equal(true); | ||
done(); | ||
}); | ||
test('Empty() x empty', done => { | ||
cmp.id(Empty, empty).should.equal(true); | ||
done(); | ||
}); | ||
test('Empty() x Empty()', done => { | ||
@@ -900,3 +880,3 @@ cmp.id(Empty, Empty).should.equal(true); | ||
test('string x String()', done => { | ||
cmp.id(foo, Bar).should.equal(false); | ||
cmp.id(foo, Foo).should.equal(false); | ||
done(); | ||
@@ -906,3 +886,3 @@ }); | ||
test('String() x string', done => { | ||
cmp.id(Foo, bar).should.equal(false); | ||
cmp.id(Foo, foo).should.equal(false); | ||
done(); | ||
@@ -955,4 +935,14 @@ }); | ||
}); | ||
test('empty x Empty()', done => { | ||
cmp.id(empty, Empty).should.equal(false); | ||
done(); | ||
}); | ||
test('Empty() x empty', done => { | ||
cmp.id(Empty, empty).should.equal(false); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
}); |
@@ -64,6 +64,6 @@ 'use strict'; | ||
suite('ge', () => { | ||
suite('gte', () => { | ||
suite('equal => true', () => { | ||
test('undefined x undefined', done => { | ||
cmp.ge(undefined, undefined).should.equal(true); | ||
cmp.gte(undefined, undefined).should.equal(true); | ||
done(); | ||
@@ -74,6 +74,6 @@ }); | ||
suite('ges', () => { | ||
suite('gtes', () => { | ||
suite('any => false', () => { | ||
test('undefined x undefined', done => { | ||
cmp.ges(undefined, undefined).should.equal(false); | ||
cmp.gtes(undefined, undefined).should.equal(false); | ||
done(); | ||
@@ -102,6 +102,6 @@ }); | ||
suite('le', () => { | ||
suite('lte', () => { | ||
suite('equal => true', () => { | ||
test('undefined x undefined', done => { | ||
cmp.le(undefined, undefined).should.equal(true); | ||
cmp.lte(undefined, undefined).should.equal(true); | ||
done(); | ||
@@ -112,6 +112,6 @@ }); | ||
suite('les', () => { | ||
suite('ltes', () => { | ||
suite('any => false', () => { | ||
test('undefined x undefined', done => { | ||
cmp.les(undefined, undefined).should.equal(false); | ||
cmp.ltes(undefined, undefined).should.equal(false); | ||
done(); | ||
@@ -118,0 +118,0 @@ }); |
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
19
161023
2
5646
79
+ Addedis-subset-of@1.0.0
+ Addedtypedescriptor@1.0.0
+ Added@babel/runtime@7.3.17.3.4(transitive)
+ Addedis-subset-of@1.0.0(transitive)
+ Addedregenerator-runtime@0.12.1(transitive)
+ Addedtypedescriptor@1.0.0(transitive)