should-equal
Advanced tools
Comparing version 0.8.0 to 1.0.0
{ | ||
"name": "should-equal", | ||
"version": "0.8.0", | ||
"version": "1.0.0", | ||
"description": "Deep comparison of 2 instances for should.js", | ||
"main": "index.js", | ||
"main": "cjs/should-equal.js", | ||
"jsnext:main": "es6/should-equal.js", | ||
"scripts": { | ||
"test": "mocha --ui bdd -R mocha-better-spec-reporter test.js" | ||
"test": "mocha --ui bdd -R mocha-better-spec-reporter test.js", | ||
"cjs": "rollup --format=cjs --output=cjs/should-equal.js index.js", | ||
"es6": "rollup --format=es6 --output=es6/should-equal.js index.js", | ||
"build": "npm run cjs && npm run es6", | ||
"prepublish": "npm run build", | ||
"pretest": "npm run build" | ||
}, | ||
@@ -27,7 +33,14 @@ "repository": { | ||
"mocha": "latest", | ||
"mocha-better-spec-reporter": "latest" | ||
"mocha-better-spec-reporter": "latest", | ||
"rollup": "^0.26.3" | ||
}, | ||
"dependencies": { | ||
"should-type": "0.2.0" | ||
} | ||
"should-type": "^1.0.0" | ||
}, | ||
"files": [ | ||
"cjs/*", | ||
"es6/*", | ||
"README.md", | ||
"LICENSE" | ||
] | ||
} |
@@ -6,16 +6,20 @@ equal | ||
Deep equality comparison implementation for should.js | ||
Deep equality comparison implementation for should.js. **Not supported outside of should.js** | ||
Function return an object that have result of comparison and description of fail: | ||
Function returns an array of failed equality checks if array is empty it means objects are equal: | ||
```js | ||
> var eq = require('.'); | ||
undefined | ||
> var a = {a:1,b:2,c:3,d:4,e:5,f:6,g:7,h:8,i:9,j:10}, | ||
... b = {a:1,b:2,c:3,d:4,e:5,f:6,g:7,h:7,i:9,j:10}; | ||
undefined | ||
> eql(a, b); | ||
{ result: false, | ||
path: [ 'h' ], | ||
reason: 'A and B are not equal', | ||
a: 8, | ||
b: 7 } | ||
> eq(a, b) | ||
[ EqualityFail { | ||
a: 8, | ||
b: 7, | ||
reason: 'A is not equal to B', | ||
path: [ 'h' ], | ||
showReason: false } ] | ||
> | ||
``` |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
25
18409
4
5
492
1
+ Addedshould-type@1.4.0(transitive)
- Removedshould-type@0.2.0(transitive)
Updatedshould-type@^1.0.0