A comparison library for arbitrarily deep structures
$ node
> var cmp = require("cmp");
> cmp.cmp([1, 2, 3], [1, 2, 3]);
0
> cmp.eq([1, 2, 3], [1, 2, 3]);
true
> cmp.cmp([1, 2, 3], [1, 2, 3, 4]);
-1
> cmp.eq([1, 2, 3], [1, 2, 3, 4]);
false
> cmp.cmp("abc", "abc");
0
> cmp.eq("abc", "abc");
true
> cmp.cmp("abc", "abcdef");
-1
> cmp.eq("abc", "abcdef");
false
https://github.com/mcandre/node-cmp
https://www.npmjs.com/package/cmp
- Node.js 0.11.6+
- Ruby 2.3+
- Bundler
- Guard
- aspelllint
- editorconfig-cli (e.g.
go get github.com/amyboyd/editorconfig-cli
) - flcl (e.g.
go get github.com/mcandre/flcl/...
)
Ensure the logic is correct:
$ grunt test
...
Keep the code tidy:
$ grunt lint
$ grunt aspelllint
Guard can automatically run testing when the code changes:
$ bundle
$ guard -G Guardfile
...
Guard can automatically lint when the code changes:
$ bundle
$ guard -G Guardfile-lint
...
See hooks/
.