fsevents 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fsevents might be problematic. Click here for more details.
- package/Readme.md +12 -13
- package/node_modules/ansi/package.json +1 -2
- package/node_modules/are-we-there-yet/package.json +1 -2
- package/node_modules/asn1/.travis.yml +4 -0
- package/node_modules/asn1/lib/ber/reader.js +27 -33
- package/node_modules/asn1/lib/ber/writer.js +10 -11
- package/node_modules/asn1/package.json +21 -19
- package/node_modules/asn1/tst/ber/reader.test.js +36 -0
- package/node_modules/asn1/tst/ber/writer.test.js +74 -0
- package/node_modules/assert-plus/package.json +1 -0
- package/node_modules/{ctype → bl/node_modules/readable-stream/node_modules/core-util-is}/LICENSE +1 -6
- package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +11 -11
- package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json +17 -12
- package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/test.js +68 -0
- package/node_modules/boom/package.json +1 -1
- package/node_modules/commander/package.json +1 -1
- package/node_modules/core-util-is/LICENSE +19 -0
- package/node_modules/core-util-is/lib/util.js +11 -11
- package/node_modules/core-util-is/package.json +17 -12
- package/node_modules/core-util-is/test.js +68 -0
- package/node_modules/dashdash/README.md +508 -0
- package/node_modules/dashdash/lib/dashdash.js +813 -0
- package/node_modules/dashdash/package.json +87 -0
- package/node_modules/deep-extend/LICENSE +1 -1
- package/node_modules/deep-extend/README.md +89 -52
- package/node_modules/deep-extend/index.js +1 -90
- package/node_modules/deep-extend/lib/deep-extend.js +144 -0
- package/node_modules/deep-extend/package.json +47 -16
- package/node_modules/deep-extend/test/index.spec.js +168 -5
- package/node_modules/delegates/package.json +1 -2
- package/node_modules/ecc-jsbn/.npmignore +15 -0
- package/node_modules/ecc-jsbn/LICENSE +21 -0
- package/node_modules/ecc-jsbn/README.md +8 -0
- package/node_modules/ecc-jsbn/index.js +57 -0
- package/node_modules/ecc-jsbn/lib/LICENSE-jsbn +40 -0
- package/node_modules/ecc-jsbn/lib/ec.js +561 -0
- package/node_modules/ecc-jsbn/lib/sec.js +170 -0
- package/node_modules/ecc-jsbn/package.json +63 -0
- package/node_modules/ecc-jsbn/test.js +14 -0
- package/node_modules/extsprintf/.gitmodules +6 -0
- package/node_modules/{path-is-absolute/license → extsprintf/LICENSE} +2 -4
- package/node_modules/extsprintf/Makefile +23 -0
- package/node_modules/extsprintf/Makefile.deps +39 -0
- package/node_modules/extsprintf/Makefile.targ +285 -0
- package/node_modules/extsprintf/README.md +39 -0
- package/node_modules/extsprintf/examples/simple.js +2 -0
- package/node_modules/{ctype/tools/jsl.conf → extsprintf/jsl.node.conf} +71 -63
- package/node_modules/extsprintf/lib/extsprintf.js +166 -0
- package/node_modules/extsprintf/package.json +48 -0
- package/node_modules/fstream/package.json +1 -2
- package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/package.json +4 -22
- package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/package.json +3 -21
- package/node_modules/{brace-expansion → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion}/package.json +4 -23
- package/node_modules/fstream-ignore/node_modules/minimatch/package.json +4 -24
- package/node_modules/fstream-ignore/package.json +1 -2
- package/node_modules/gauge/package.json +1 -2
- package/node_modules/har-validator/package.json +15 -15
- package/node_modules/has-unicode/package.json +1 -2
- package/node_modules/hawk/dist/client.js +340 -0
- package/node_modules/hawk/lib/browser.js +14 -20
- package/node_modules/hawk/package.json +10 -10
- package/node_modules/hawk/test/browser.js +134 -101
- package/node_modules/hawk/test/index.js +61 -61
- package/node_modules/hawk/test/server.js +72 -84
- package/node_modules/hawk/test/uri.js +52 -63
- package/node_modules/http-signature/CHANGES.md +39 -0
- package/node_modules/http-signature/http_signing.md +16 -17
- package/node_modules/http-signature/lib/index.js +6 -4
- package/node_modules/http-signature/lib/parser.js +43 -29
- package/node_modules/http-signature/lib/signer.js +290 -74
- package/node_modules/http-signature/lib/utils.js +112 -0
- package/node_modules/http-signature/lib/verify.js +47 -15
- package/node_modules/http-signature/package.json +20 -14
- package/node_modules/is-my-json-valid/index.js +16 -14
- package/node_modules/is-my-json-valid/package.json +16 -12
- package/node_modules/is-typedarray/LICENSE.md +18 -0
- package/node_modules/is-typedarray/README.md +16 -0
- package/node_modules/is-typedarray/index.js +41 -0
- package/node_modules/is-typedarray/package.json +63 -0
- package/node_modules/is-typedarray/test.js +34 -0
- package/node_modules/jodid25519/.npmignore +11 -0
- package/node_modules/jodid25519/.travis.yml +7 -0
- package/node_modules/jodid25519/AUTHORS.md +3 -0
- package/node_modules/jodid25519/LICENSE +23 -0
- package/node_modules/jodid25519/README.md +51 -0
- package/node_modules/jodid25519/almond.0 +42 -0
- package/node_modules/jodid25519/almond.1 +13 -0
- package/node_modules/jodid25519/index.js +35 -0
- package/node_modules/jodid25519/jsdoc.json +19 -0
- package/node_modules/jodid25519/lib/core.js +481 -0
- package/node_modules/jodid25519/lib/curve255.js +221 -0
- package/node_modules/jodid25519/lib/dh.js +111 -0
- package/node_modules/jodid25519/lib/eddsa.js +573 -0
- package/node_modules/jodid25519/lib/utils.js +198 -0
- package/node_modules/jodid25519/package.json +77 -0
- package/node_modules/jsbn/.npmignore +2 -0
- package/node_modules/jsbn/LICENSE +40 -0
- package/node_modules/jsbn/README.md +175 -0
- package/node_modules/jsbn/example.html +12 -0
- package/node_modules/jsbn/example.js +3 -0
- package/node_modules/jsbn/index.js +1358 -0
- package/node_modules/jsbn/package.json +60 -0
- package/node_modules/json-schema/README.md +5 -0
- package/node_modules/json-schema/draft-00/hyper-schema +68 -0
- package/node_modules/json-schema/draft-00/json-ref +26 -0
- package/node_modules/json-schema/draft-00/links +33 -0
- package/node_modules/json-schema/draft-00/schema +155 -0
- package/node_modules/json-schema/draft-01/hyper-schema +68 -0
- package/node_modules/json-schema/draft-01/json-ref +26 -0
- package/node_modules/json-schema/draft-01/links +33 -0
- package/node_modules/json-schema/draft-01/schema +155 -0
- package/node_modules/json-schema/draft-02/hyper-schema +68 -0
- package/node_modules/json-schema/draft-02/json-ref +26 -0
- package/node_modules/json-schema/draft-02/links +35 -0
- package/node_modules/json-schema/draft-02/schema +166 -0
- package/node_modules/json-schema/draft-03/examples/address +20 -0
- package/node_modules/json-schema/draft-03/examples/calendar +53 -0
- package/node_modules/json-schema/draft-03/examples/card +105 -0
- package/node_modules/json-schema/draft-03/examples/geo +8 -0
- package/node_modules/json-schema/draft-03/examples/interfaces +23 -0
- package/node_modules/json-schema/draft-03/hyper-schema +60 -0
- package/node_modules/json-schema/draft-03/json-ref +26 -0
- package/node_modules/json-schema/draft-03/links +35 -0
- package/node_modules/json-schema/draft-03/schema +174 -0
- package/node_modules/json-schema/draft-04/hyper-schema +60 -0
- package/node_modules/json-schema/draft-04/links +41 -0
- package/node_modules/json-schema/draft-04/schema +189 -0
- package/node_modules/json-schema/draft-zyp-json-schema-03.xml +1120 -0
- package/node_modules/json-schema/draft-zyp-json-schema-04.xml +1072 -0
- package/node_modules/json-schema/lib/links.js +52 -0
- package/node_modules/json-schema/lib/validate.js +260 -0
- package/node_modules/json-schema/package.json +67 -0
- package/node_modules/json-schema/test/tests.js +95 -0
- package/node_modules/jsprim/CHANGES.md +30 -0
- package/node_modules/jsprim/LICENSE +19 -0
- package/node_modules/jsprim/README.md +228 -0
- package/node_modules/jsprim/lib/jsprim.js +478 -0
- package/node_modules/jsprim/package.json +54 -0
- package/node_modules/lodash._basetostring/package.json +1 -2
- package/node_modules/lodash._createpadding/package.json +1 -2
- package/node_modules/lodash.pad/package.json +1 -2
- package/node_modules/lodash.padleft/package.json +1 -2
- package/node_modules/lodash.padright/package.json +1 -2
- package/node_modules/lodash.repeat/package.json +1 -2
- package/node_modules/node-pre-gyp/CHANGELOG.md +8 -0
- package/node_modules/node-pre-gyp/README.md +570 -0
- package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +4 -0
- package/node_modules/node-pre-gyp/node_modules/nopt/lib/nopt.js +2 -1
- package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/package.json +30 -37
- package/node_modules/node-pre-gyp/node_modules/nopt/package.json +37 -57
- package/node_modules/node-pre-gyp/node_modules/nopt/test/basic.js +22 -0
- package/node_modules/node-pre-gyp/package.json +17 -17
- package/node_modules/node-uuid/.npmignore +2 -0
- package/node_modules/node-uuid/README.md +12 -1
- package/node_modules/node-uuid/bower.json +1 -1
- package/node_modules/node-uuid/component.json +11 -4
- package/node_modules/node-uuid/package.json +25 -12
- package/node_modules/node-uuid/test/test.js +3 -0
- package/node_modules/node-uuid/uuid.js +70 -45
- package/node_modules/npmlog/.travis.yml +14 -0
- package/node_modules/npmlog/log.js +3 -0
- package/node_modules/npmlog/package.json +23 -20
- package/node_modules/npmlog/test/basic.js +8 -1
- package/node_modules/once/package.json +2 -3
- package/node_modules/pinkie/index.js +23 -7
- package/node_modules/pinkie/package.json +22 -15
- package/node_modules/pinkie/readme.md +17 -9
- package/node_modules/pinkie-promise/package.json +16 -14
- package/node_modules/pinkie-promise/readme.md +5 -3
- package/node_modules/rc/README.md +1 -1
- package/node_modules/rc/index.js +1 -1
- package/node_modules/rc/node_modules/minimist/package.json +1 -1
- package/node_modules/rc/package.json +12 -12
- package/node_modules/request/.eslintrc +1 -1
- package/node_modules/request/.travis.yml +4 -4
- package/node_modules/request/CHANGELOG.md +25 -0
- package/node_modules/request/README.md +12 -13
- package/node_modules/request/lib/har.js +84 -75
- package/node_modules/request/lib/redirect.js +2 -3
- package/node_modules/request/lib/tunnel.js +13 -18
- package/node_modules/request/package.json +17 -16
- package/node_modules/request/request.js +16 -59
- package/node_modules/rimraf/README.md +7 -2
- package/node_modules/{wrappy → rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy}/package.json +5 -25
- package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/package.json +5 -25
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/LICENSE +16 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/README.md +42 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits.js +1 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits_browser.js +23 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json +58 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/test.js +25 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore +3 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +122 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js +8 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +191 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore +2 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml +3 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md +21 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile +6 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +80 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js +5 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +38 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +79 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +56 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml +4 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE +18 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown +62 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js +6 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js +13 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +90 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js +39 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +81 -0
- package/node_modules/rimraf/node_modules/{minimatch → glob/node_modules/minimatch}/package.json +3 -21
- package/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/README.md +36 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/package.json +58 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js +51 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js +33 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/once/package.json +70 -0
- package/node_modules/{path-is-absolute → rimraf/node_modules/glob/node_modules/path-is-absolute}/package.json +4 -22
- package/node_modules/rimraf/node_modules/glob/package.json +2 -20
- package/node_modules/rimraf/package.json +10 -10
- package/node_modules/semver/README.md +25 -1
- package/node_modules/semver/package.json +10 -10
- package/node_modules/semver/range.bnf +16 -0
- package/node_modules/semver/semver.js +0 -12
- package/node_modules/sshpk/.npmignore +8 -0
- package/node_modules/sshpk/.travis.yml +11 -0
- package/node_modules/sshpk/LICENSE +18 -0
- package/node_modules/sshpk/README.md +436 -0
- package/node_modules/sshpk/bin/sshpk-conv +183 -0
- package/node_modules/sshpk/lib/algs.js +168 -0
- package/node_modules/sshpk/lib/dhe.js +312 -0
- package/node_modules/sshpk/lib/ed-compat.js +94 -0
- package/node_modules/sshpk/lib/errors.js +58 -0
- package/node_modules/sshpk/lib/fingerprint.js +140 -0
- package/node_modules/sshpk/lib/formats/auto.js +73 -0
- package/node_modules/sshpk/lib/formats/pem.js +152 -0
- package/node_modules/sshpk/lib/formats/pkcs1.js +320 -0
- package/node_modules/sshpk/lib/formats/pkcs8.js +510 -0
- package/node_modules/sshpk/lib/formats/rfc4253.js +145 -0
- package/node_modules/sshpk/lib/formats/ssh-private.js +138 -0
- package/node_modules/sshpk/lib/formats/ssh.js +114 -0
- package/node_modules/sshpk/lib/index.js +25 -0
- package/node_modules/sshpk/lib/key.js +260 -0
- package/node_modules/sshpk/lib/private-key.js +224 -0
- package/node_modules/sshpk/lib/signature.js +237 -0
- package/node_modules/sshpk/lib/ssh-buffer.js +123 -0
- package/node_modules/sshpk/lib/utils.js +207 -0
- package/node_modules/sshpk/node_modules/assert-plus/AUTHORS +6 -0
- package/node_modules/sshpk/node_modules/assert-plus/CHANGES.md +8 -0
- package/node_modules/sshpk/node_modules/assert-plus/README.md +155 -0
- package/node_modules/sshpk/node_modules/assert-plus/assert.js +206 -0
- package/node_modules/sshpk/node_modules/assert-plus/package.json +88 -0
- package/node_modules/sshpk/package.json +92 -0
- package/node_modules/strip-json-comments/cli.js +2 -2
- package/node_modules/strip-json-comments/package.json +13 -12
- package/node_modules/strip-json-comments/readme.md +11 -5
- package/node_modules/strip-json-comments/strip-json-comments.js +16 -7
- package/node_modules/tar/package.json +1 -2
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/LICENSE +19 -0
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +11 -11
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/package.json +17 -12
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/test.js +68 -0
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/inherits/package.json +1 -1
- package/node_modules/tar-pack/node_modules/rimraf/package.json +1 -2
- package/node_modules/tar-pack/package.json +1 -2
- package/node_modules/tough-cookie/lib/cookie.js +1 -1
- package/node_modules/tough-cookie/package.json +7 -7
- package/node_modules/tweetnacl/.npmignore +4 -0
- package/node_modules/tweetnacl/CHANGELOG.md +128 -0
- package/node_modules/tweetnacl/README.md +463 -0
- package/node_modules/tweetnacl/nacl-fast.js +2418 -0
- package/node_modules/tweetnacl/nacl-fast.min.js +2 -0
- package/node_modules/tweetnacl/nacl.js +1205 -0
- package/node_modules/tweetnacl/nacl.min.js +1 -0
- package/node_modules/tweetnacl/package.json +101 -0
- package/node_modules/uid-number/package.json +2 -3
- package/node_modules/verror/.gitmodules +0 -0
- package/node_modules/verror/LICENSE +19 -0
- package/node_modules/verror/Makefile +35 -0
- package/node_modules/verror/Makefile.targ +285 -0
- package/node_modules/verror/README.md +120 -0
- package/node_modules/verror/examples/levels-verror.js +36 -0
- package/node_modules/verror/examples/levels-werror.js +34 -0
- package/node_modules/verror/examples/varargs.js +6 -0
- package/node_modules/verror/examples/verror.js +13 -0
- package/node_modules/verror/examples/werror.js +14 -0
- package/node_modules/verror/jsl.node.conf +139 -0
- package/node_modules/verror/lib/verror.js +157 -0
- package/node_modules/verror/package.json +51 -0
- package/node_modules/verror/tests/tst.inherit.js +100 -0
- package/node_modules/verror/tests/tst.verror.js +156 -0
- package/node_modules/verror/tests/tst.werror.js +179 -0
- package/package.json +3 -3
- package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/util.js +0 -106
- package/node_modules/core-util-is/util.js +0 -106
- package/node_modules/ctype/.npmignore +0 -1
- package/node_modules/ctype/CHANGELOG +0 -78
- package/node_modules/ctype/README +0 -82
- package/node_modules/ctype/README.old +0 -298
- package/node_modules/ctype/ctf.js +0 -245
- package/node_modules/ctype/ctio.js +0 -1485
- package/node_modules/ctype/ctype.js +0 -944
- package/node_modules/ctype/man/man3ctype/ctio.3ctype +0 -241
- package/node_modules/ctype/package.json +0 -51
- package/node_modules/ctype/tools/jsstyle +0 -839
- package/node_modules/http-signature/lib/util.js +0 -306
- package/node_modules/inflight/node_modules/once/package.json +0 -86
- package/node_modules/inflight/node_modules/once/test/once.js +0 -23
- package/node_modules/rimraf/node_modules/glob/LICENSE +0 -15
- package/node_modules/rimraf/node_modules/minimatch/LICENSE +0 -15
- package/node_modules/rimraf/node_modules/once/LICENSE +0 -15
- package/node_modules/rimraf/node_modules/once/README.md +0 -51
- package/node_modules/rimraf/node_modules/once/once.js +0 -21
- package/node_modules/rimraf/node_modules/once/package.json +0 -84
- package/node_modules/rimraf/node_modules/once/test/once.js +0 -23
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/util.js +0 -106
- package/node_modules/wrappy/LICENSE +0 -15
- /package/node_modules/{brace-expansion → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion}/.npmignore +0 -0
- /package/node_modules/{brace-expansion → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion}/README.md +0 -0
- /package/node_modules/{brace-expansion → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion}/example.js +0 -0
- /package/node_modules/{brace-expansion → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion}/index.js +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/.npmignore +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/.travis.yml +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/LICENSE.md +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/Makefile +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/README.md +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/example.js +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/index.js +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/test/balanced.js +0 -0
- /package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/.travis.yml +0 -0
- /package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/LICENSE +0 -0
- /package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/README.markdown +0 -0
- /package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/example/map.js +0 -0
- /package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/index.js +0 -0
- /package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/test/map.js +0 -0
- /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/.npmignore +0 -0
- /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/.travis.yml +0 -0
- /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/CONTRIBUTING.md +0 -0
- /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/LICENSE +0 -0
- /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/README.md +0 -0
- /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/abbrev.js +0 -0
- /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/test.js +0 -0
- /package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/.eslintrc +0 -0
- /package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/LICENSE +0 -0
- /package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/README.md +0 -0
- /package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/inflight.js +0 -0
- /package/node_modules/{fstream-ignore/node_modules/minimatch → rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy}/LICENSE +0 -0
- /package/node_modules/{wrappy → rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy}/README.md +0 -0
- /package/node_modules/{wrappy → rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy}/test/basic.js +0 -0
- /package/node_modules/{wrappy → rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy}/wrappy.js +0 -0
- /package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/test.js +0 -0
- /package/node_modules/rimraf/node_modules/{minimatch → glob/node_modules/minimatch}/README.md +0 -0
- /package/node_modules/rimraf/node_modules/{minimatch → glob/node_modules/minimatch}/minimatch.js +0 -0
- /package/node_modules/{inflight → rimraf/node_modules/glob}/node_modules/once/README.md +0 -0
- /package/node_modules/{inflight/node_modules/once → rimraf/node_modules/glob/node_modules/once/node_modules/wrappy}/LICENSE +0 -0
- /package/node_modules/{inflight → rimraf/node_modules/glob}/node_modules/once/once.js +0 -0
- /package/node_modules/{path-is-absolute → rimraf/node_modules/glob/node_modules/path-is-absolute}/index.js +0 -0
- /package/node_modules/{path-is-absolute → rimraf/node_modules/glob/node_modules/path-is-absolute}/readme.md +0 -0
- /package/node_modules/{deep-extend → verror}/.npmignore +0 -0
@@ -0,0 +1,179 @@
|
|
1
|
+
/*
|
2
|
+
* tst.werror.js: tests basic functionality of the WError class.
|
3
|
+
*/
|
4
|
+
|
5
|
+
var mod_assert = require('assert');
|
6
|
+
var mod_verror = require('../lib/verror');
|
7
|
+
|
8
|
+
var VError = mod_verror.VError;
|
9
|
+
var WError = mod_verror.WError;
|
10
|
+
|
11
|
+
var err, suberr, stack, substack;
|
12
|
+
|
13
|
+
/*
|
14
|
+
* Remove full paths and relative line numbers from stack traces so that we can
|
15
|
+
* compare against "known-good" output.
|
16
|
+
*/
|
17
|
+
function cleanStack(stacktxt)
|
18
|
+
{
|
19
|
+
var re = new RegExp(__filename + ':\\d+:\\d+', 'gm');
|
20
|
+
stacktxt = stacktxt.replace(re, 'tst.werror.js');
|
21
|
+
return (stacktxt);
|
22
|
+
}
|
23
|
+
|
24
|
+
/*
|
25
|
+
* Save the generic parts of all stack traces so we can avoid hardcoding
|
26
|
+
* Node-specific implementation details in our testing of stack traces.
|
27
|
+
*/
|
28
|
+
var nodestack = new Error().stack.split('\n').slice(2).join('\n');
|
29
|
+
|
30
|
+
/* no arguments */
|
31
|
+
err = new WError();
|
32
|
+
mod_assert.equal(err.name, 'WError');
|
33
|
+
mod_assert.ok(err instanceof Error);
|
34
|
+
mod_assert.ok(err instanceof WError);
|
35
|
+
mod_assert.equal(err.message, '');
|
36
|
+
mod_assert.equal(err.toString(), 'WError');
|
37
|
+
mod_assert.ok(err.cause() === undefined);
|
38
|
+
stack = cleanStack(err.stack);
|
39
|
+
mod_assert.equal(stack, [
|
40
|
+
'WError',
|
41
|
+
' at Object.<anonymous> (tst.werror.js)'
|
42
|
+
].join('\n') + '\n' + nodestack);
|
43
|
+
|
44
|
+
/* options-argument form */
|
45
|
+
err = new WError({});
|
46
|
+
mod_assert.equal(err.message, '');
|
47
|
+
mod_assert.equal(err.toString(), 'WError');
|
48
|
+
mod_assert.ok(err.cause() === undefined);
|
49
|
+
|
50
|
+
/* simple message */
|
51
|
+
err = new WError('my error');
|
52
|
+
mod_assert.equal(err.message, 'my error');
|
53
|
+
mod_assert.equal(err.toString(), 'WError: my error');
|
54
|
+
mod_assert.ok(err.cause() === undefined);
|
55
|
+
stack = cleanStack(err.stack);
|
56
|
+
mod_assert.equal(stack, [
|
57
|
+
'WError: my error',
|
58
|
+
' at Object.<anonymous> (tst.werror.js)'
|
59
|
+
].join('\n') + '\n' + nodestack);
|
60
|
+
|
61
|
+
err = new WError({}, 'my error');
|
62
|
+
mod_assert.equal(err.message, 'my error');
|
63
|
+
mod_assert.equal(err.toString(), 'WError: my error');
|
64
|
+
mod_assert.ok(err.cause() === undefined);
|
65
|
+
|
66
|
+
/* printf-style message */
|
67
|
+
err = new WError('%s error: %3d problems', 'very bad', 15);
|
68
|
+
mod_assert.equal(err.message, 'very bad error: 15 problems');
|
69
|
+
mod_assert.equal(err.toString(), 'WError: very bad error: 15 problems');
|
70
|
+
mod_assert.ok(err.cause() === undefined);
|
71
|
+
|
72
|
+
err = new WError({}, '%s error: %3d problems', 'very bad', 15);
|
73
|
+
mod_assert.equal(err.message, 'very bad error: 15 problems');
|
74
|
+
mod_assert.equal(err.toString(), 'WError: very bad error: 15 problems');
|
75
|
+
mod_assert.ok(err.cause() === undefined);
|
76
|
+
|
77
|
+
/* caused by another error, with no additional message */
|
78
|
+
suberr = new Error('root cause');
|
79
|
+
err = new WError(suberr);
|
80
|
+
mod_assert.equal(err.message, '');
|
81
|
+
mod_assert.equal(err.toString(), 'WError; caused by Error: root cause');
|
82
|
+
mod_assert.ok(err.cause() === suberr);
|
83
|
+
|
84
|
+
err = new WError({ 'cause': suberr });
|
85
|
+
mod_assert.equal(err.message, '');
|
86
|
+
mod_assert.equal(err.toString(), 'WError; caused by Error: root cause');
|
87
|
+
mod_assert.ok(err.cause() === suberr);
|
88
|
+
|
89
|
+
/* caused by another error, with annotation */
|
90
|
+
err = new WError(suberr, 'proximate cause: %d issues', 3);
|
91
|
+
mod_assert.equal(err.message, 'proximate cause: 3 issues');
|
92
|
+
mod_assert.equal(err.toString(), 'WError: proximate cause: 3 issues; ' +
|
93
|
+
'caused by Error: root cause');
|
94
|
+
mod_assert.ok(err.cause() === suberr);
|
95
|
+
stack = cleanStack(err.stack);
|
96
|
+
mod_assert.equal(stack, [
|
97
|
+
'WError: proximate cause: 3 issues; caused by Error: root cause',
|
98
|
+
' at Object.<anonymous> (tst.werror.js)'
|
99
|
+
].join('\n') + '\n' + nodestack);
|
100
|
+
|
101
|
+
err = new WError({ 'cause': suberr }, 'proximate cause: %d issues', 3);
|
102
|
+
mod_assert.equal(err.message, 'proximate cause: 3 issues');
|
103
|
+
mod_assert.equal(err.toString(), 'WError: proximate cause: 3 issues; ' +
|
104
|
+
'caused by Error: root cause');
|
105
|
+
mod_assert.ok(err.cause() === suberr);
|
106
|
+
stack = cleanStack(err.stack);
|
107
|
+
mod_assert.equal(stack, [
|
108
|
+
'WError: proximate cause: 3 issues; caused by Error: root cause',
|
109
|
+
' at Object.<anonymous> (tst.werror.js)'
|
110
|
+
].join('\n') + '\n' + nodestack);
|
111
|
+
|
112
|
+
/* caused by another WError, with annotation. */
|
113
|
+
suberr = err;
|
114
|
+
err = new WError(suberr, 'top');
|
115
|
+
mod_assert.equal(err.message, 'top');
|
116
|
+
mod_assert.equal(err.toString(), 'WError: top; caused by WError: ' +
|
117
|
+
'proximate cause: 3 issues; caused by Error: root cause');
|
118
|
+
mod_assert.ok(err.cause() === suberr);
|
119
|
+
|
120
|
+
err = new WError({ 'cause': suberr }, 'top');
|
121
|
+
mod_assert.equal(err.message, 'top');
|
122
|
+
mod_assert.equal(err.toString(), 'WError: top; caused by WError: ' +
|
123
|
+
'proximate cause: 3 issues; caused by Error: root cause');
|
124
|
+
mod_assert.ok(err.cause() === suberr);
|
125
|
+
|
126
|
+
/* caused by a VError */
|
127
|
+
suberr = new VError(new Error('root cause'), 'mid');
|
128
|
+
err = new WError(suberr, 'top');
|
129
|
+
mod_assert.equal(err.message, 'top');
|
130
|
+
mod_assert.equal(err.toString(),
|
131
|
+
'WError: top; caused by VError: mid: root cause');
|
132
|
+
mod_assert.ok(err.cause() === suberr);
|
133
|
+
|
134
|
+
/* null cause (for backwards compatibility with older versions) */
|
135
|
+
err = new WError(null, 'my error');
|
136
|
+
mod_assert.equal(err.message, 'my error');
|
137
|
+
mod_assert.equal(err.toString(), 'WError: my error');
|
138
|
+
mod_assert.ok(err.cause() === undefined);
|
139
|
+
stack = cleanStack(err.stack);
|
140
|
+
mod_assert.equal(stack, [
|
141
|
+
'WError: my error',
|
142
|
+
' at Object.<anonymous> (tst.werror.js)'
|
143
|
+
].join('\n') + '\n' + nodestack);
|
144
|
+
|
145
|
+
err = new WError({ 'cause': null }, 'my error');
|
146
|
+
mod_assert.equal(err.message, 'my error');
|
147
|
+
mod_assert.equal(err.toString(), 'WError: my error');
|
148
|
+
mod_assert.ok(err.cause() === undefined);
|
149
|
+
|
150
|
+
err = new WError(null);
|
151
|
+
mod_assert.equal(err.message, '');
|
152
|
+
mod_assert.equal(err.toString(), 'WError');
|
153
|
+
mod_assert.ok(err.cause() === undefined);
|
154
|
+
stack = cleanStack(err.stack);
|
155
|
+
mod_assert.equal(stack, [
|
156
|
+
'WError',
|
157
|
+
' at Object.<anonymous> (tst.werror.js)'
|
158
|
+
].join('\n') + '\n' + nodestack);
|
159
|
+
|
160
|
+
/* constructorOpt */
|
161
|
+
function makeErr(options) {
|
162
|
+
return (new WError(options, 'test error'));
|
163
|
+
}
|
164
|
+
err = makeErr({});
|
165
|
+
mod_assert.equal(err.toString(), 'WError: test error');
|
166
|
+
stack = cleanStack(err.stack);
|
167
|
+
mod_assert.equal(stack, [
|
168
|
+
'WError: test error',
|
169
|
+
' at makeErr (tst.werror.js)',
|
170
|
+
' at Object.<anonymous> (tst.werror.js)'
|
171
|
+
].join('\n') + '\n' + nodestack);
|
172
|
+
|
173
|
+
err = makeErr({ 'constructorOpt': makeErr });
|
174
|
+
mod_assert.equal(err.toString(), 'WError: test error');
|
175
|
+
stack = cleanStack(err.stack);
|
176
|
+
mod_assert.equal(stack, [
|
177
|
+
'WError: test error',
|
178
|
+
' at Object.<anonymous> (tst.werror.js)'
|
179
|
+
].join('\n') + '\n' + nodestack);
|
package/package.json
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "fsevents",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.6",
|
4
4
|
"description": "Native Access to Mac OS-X FSEvents",
|
5
5
|
"main": "fsevents.js",
|
6
6
|
"dependencies": {
|
7
|
-
"nan": "^2.0
|
8
|
-
"node-pre-gyp": "^0.6.
|
7
|
+
"nan": "^2.1.0",
|
8
|
+
"node-pre-gyp": "^0.6.17"
|
9
9
|
},
|
10
10
|
"os": [
|
11
11
|
"darwin"
|
@@ -1,106 +0,0 @@
|
|
1
|
-
// Copyright Joyent, Inc. and other Node contributors.
|
2
|
-
//
|
3
|
-
// Permission is hereby granted, free of charge, to any person obtaining a
|
4
|
-
// copy of this software and associated documentation files (the
|
5
|
-
// "Software"), to deal in the Software without restriction, including
|
6
|
-
// without limitation the rights to use, copy, modify, merge, publish,
|
7
|
-
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
8
|
-
// persons to whom the Software is furnished to do so, subject to the
|
9
|
-
// following conditions:
|
10
|
-
//
|
11
|
-
// The above copyright notice and this permission notice shall be included
|
12
|
-
// in all copies or substantial portions of the Software.
|
13
|
-
//
|
14
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
15
|
-
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
17
|
-
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
18
|
-
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
19
|
-
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
20
|
-
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
|
-
|
22
|
-
// NOTE: These type checking functions intentionally don't use `instanceof`
|
23
|
-
// because it is fragile and can be easily faked with `Object.create()`.
|
24
|
-
function isArray(ar) {
|
25
|
-
return Array.isArray(ar);
|
26
|
-
}
|
27
|
-
exports.isArray = isArray;
|
28
|
-
|
29
|
-
function isBoolean(arg) {
|
30
|
-
return typeof arg === 'boolean';
|
31
|
-
}
|
32
|
-
exports.isBoolean = isBoolean;
|
33
|
-
|
34
|
-
function isNull(arg) {
|
35
|
-
return arg === null;
|
36
|
-
}
|
37
|
-
exports.isNull = isNull;
|
38
|
-
|
39
|
-
function isNullOrUndefined(arg) {
|
40
|
-
return arg == null;
|
41
|
-
}
|
42
|
-
exports.isNullOrUndefined = isNullOrUndefined;
|
43
|
-
|
44
|
-
function isNumber(arg) {
|
45
|
-
return typeof arg === 'number';
|
46
|
-
}
|
47
|
-
exports.isNumber = isNumber;
|
48
|
-
|
49
|
-
function isString(arg) {
|
50
|
-
return typeof arg === 'string';
|
51
|
-
}
|
52
|
-
exports.isString = isString;
|
53
|
-
|
54
|
-
function isSymbol(arg) {
|
55
|
-
return typeof arg === 'symbol';
|
56
|
-
}
|
57
|
-
exports.isSymbol = isSymbol;
|
58
|
-
|
59
|
-
function isUndefined(arg) {
|
60
|
-
return arg === void 0;
|
61
|
-
}
|
62
|
-
exports.isUndefined = isUndefined;
|
63
|
-
|
64
|
-
function isRegExp(re) {
|
65
|
-
return isObject(re) && objectToString(re) === '[object RegExp]';
|
66
|
-
}
|
67
|
-
exports.isRegExp = isRegExp;
|
68
|
-
|
69
|
-
function isObject(arg) {
|
70
|
-
return typeof arg === 'object' && arg !== null;
|
71
|
-
}
|
72
|
-
exports.isObject = isObject;
|
73
|
-
|
74
|
-
function isDate(d) {
|
75
|
-
return isObject(d) && objectToString(d) === '[object Date]';
|
76
|
-
}
|
77
|
-
exports.isDate = isDate;
|
78
|
-
|
79
|
-
function isError(e) {
|
80
|
-
return isObject(e) && objectToString(e) === '[object Error]';
|
81
|
-
}
|
82
|
-
exports.isError = isError;
|
83
|
-
|
84
|
-
function isFunction(arg) {
|
85
|
-
return typeof arg === 'function';
|
86
|
-
}
|
87
|
-
exports.isFunction = isFunction;
|
88
|
-
|
89
|
-
function isPrimitive(arg) {
|
90
|
-
return arg === null ||
|
91
|
-
typeof arg === 'boolean' ||
|
92
|
-
typeof arg === 'number' ||
|
93
|
-
typeof arg === 'string' ||
|
94
|
-
typeof arg === 'symbol' || // ES6 symbol
|
95
|
-
typeof arg === 'undefined';
|
96
|
-
}
|
97
|
-
exports.isPrimitive = isPrimitive;
|
98
|
-
|
99
|
-
function isBuffer(arg) {
|
100
|
-
return arg instanceof Buffer;
|
101
|
-
}
|
102
|
-
exports.isBuffer = isBuffer;
|
103
|
-
|
104
|
-
function objectToString(o) {
|
105
|
-
return Object.prototype.toString.call(o);
|
106
|
-
}
|
@@ -1,106 +0,0 @@
|
|
1
|
-
// Copyright Joyent, Inc. and other Node contributors.
|
2
|
-
//
|
3
|
-
// Permission is hereby granted, free of charge, to any person obtaining a
|
4
|
-
// copy of this software and associated documentation files (the
|
5
|
-
// "Software"), to deal in the Software without restriction, including
|
6
|
-
// without limitation the rights to use, copy, modify, merge, publish,
|
7
|
-
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
8
|
-
// persons to whom the Software is furnished to do so, subject to the
|
9
|
-
// following conditions:
|
10
|
-
//
|
11
|
-
// The above copyright notice and this permission notice shall be included
|
12
|
-
// in all copies or substantial portions of the Software.
|
13
|
-
//
|
14
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
15
|
-
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
17
|
-
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
18
|
-
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
19
|
-
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
20
|
-
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
|
-
|
22
|
-
// NOTE: These type checking functions intentionally don't use `instanceof`
|
23
|
-
// because it is fragile and can be easily faked with `Object.create()`.
|
24
|
-
function isArray(ar) {
|
25
|
-
return Array.isArray(ar);
|
26
|
-
}
|
27
|
-
exports.isArray = isArray;
|
28
|
-
|
29
|
-
function isBoolean(arg) {
|
30
|
-
return typeof arg === 'boolean';
|
31
|
-
}
|
32
|
-
exports.isBoolean = isBoolean;
|
33
|
-
|
34
|
-
function isNull(arg) {
|
35
|
-
return arg === null;
|
36
|
-
}
|
37
|
-
exports.isNull = isNull;
|
38
|
-
|
39
|
-
function isNullOrUndefined(arg) {
|
40
|
-
return arg == null;
|
41
|
-
}
|
42
|
-
exports.isNullOrUndefined = isNullOrUndefined;
|
43
|
-
|
44
|
-
function isNumber(arg) {
|
45
|
-
return typeof arg === 'number';
|
46
|
-
}
|
47
|
-
exports.isNumber = isNumber;
|
48
|
-
|
49
|
-
function isString(arg) {
|
50
|
-
return typeof arg === 'string';
|
51
|
-
}
|
52
|
-
exports.isString = isString;
|
53
|
-
|
54
|
-
function isSymbol(arg) {
|
55
|
-
return typeof arg === 'symbol';
|
56
|
-
}
|
57
|
-
exports.isSymbol = isSymbol;
|
58
|
-
|
59
|
-
function isUndefined(arg) {
|
60
|
-
return arg === void 0;
|
61
|
-
}
|
62
|
-
exports.isUndefined = isUndefined;
|
63
|
-
|
64
|
-
function isRegExp(re) {
|
65
|
-
return isObject(re) && objectToString(re) === '[object RegExp]';
|
66
|
-
}
|
67
|
-
exports.isRegExp = isRegExp;
|
68
|
-
|
69
|
-
function isObject(arg) {
|
70
|
-
return typeof arg === 'object' && arg !== null;
|
71
|
-
}
|
72
|
-
exports.isObject = isObject;
|
73
|
-
|
74
|
-
function isDate(d) {
|
75
|
-
return isObject(d) && objectToString(d) === '[object Date]';
|
76
|
-
}
|
77
|
-
exports.isDate = isDate;
|
78
|
-
|
79
|
-
function isError(e) {
|
80
|
-
return isObject(e) && objectToString(e) === '[object Error]';
|
81
|
-
}
|
82
|
-
exports.isError = isError;
|
83
|
-
|
84
|
-
function isFunction(arg) {
|
85
|
-
return typeof arg === 'function';
|
86
|
-
}
|
87
|
-
exports.isFunction = isFunction;
|
88
|
-
|
89
|
-
function isPrimitive(arg) {
|
90
|
-
return arg === null ||
|
91
|
-
typeof arg === 'boolean' ||
|
92
|
-
typeof arg === 'number' ||
|
93
|
-
typeof arg === 'string' ||
|
94
|
-
typeof arg === 'symbol' || // ES6 symbol
|
95
|
-
typeof arg === 'undefined';
|
96
|
-
}
|
97
|
-
exports.isPrimitive = isPrimitive;
|
98
|
-
|
99
|
-
function isBuffer(arg) {
|
100
|
-
return arg instanceof Buffer;
|
101
|
-
}
|
102
|
-
exports.isBuffer = isBuffer;
|
103
|
-
|
104
|
-
function objectToString(o) {
|
105
|
-
return Object.prototype.toString.call(o);
|
106
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
tst/
|
@@ -1,78 +0,0 @@
|
|
1
|
-
This contains tickets fixed in each version release in reverse chronological
|
2
|
-
order. There is one ticket per line. Each commits message has the tickets fixed
|
3
|
-
in it. The commit message also has the corresponding github issue. i.e. CTYPE-42
|
4
|
-
would be issue 42. Each issue can be found at:
|
5
|
-
https://github.com/rmustacc/node-ctype/issues/%d.
|
6
|
-
|
7
|
-
v0.5.3
|
8
|
-
CTYPE-50 Release 0.5.3
|
9
|
-
Contributed by Nick Schonning:
|
10
|
-
CTYPE-49 Add repository section to package.json
|
11
|
-
Contributed by Jonathan Ong:
|
12
|
-
CTYPE-48 Create .npmignore
|
13
|
-
|
14
|
-
v0.5.2
|
15
|
-
CTYPE-46 Release 0.5.2
|
16
|
-
CTYPE-45 error in setEndian logic
|
17
|
-
|
18
|
-
v0.5.1
|
19
|
-
CTYPE-44 Release 0.5.1
|
20
|
-
Contributed by Terin Stock:
|
21
|
-
CTYPE-41 CTypeParser.writeStruct should return its offset
|
22
|
-
Contributed by Terin Stock:
|
23
|
-
CTYPE-42 int64_t returns wrong size
|
24
|
-
|
25
|
-
v0.5.0
|
26
|
-
CTYPE-40 Release 0.5.0
|
27
|
-
CTYPE-39 want > 0.6 engine support
|
28
|
-
|
29
|
-
v0.4.0
|
30
|
-
CTYPE-37 Release v0.4.0
|
31
|
-
CTYPE-6 want additional entry point for write
|
32
|
-
CTYPE-20 Add 64-bit int support into core parser
|
33
|
-
CTYPE-31 Fix bounds errors node/2129
|
34
|
-
CTYPE-33 Update copyright holders
|
35
|
-
CTYPE-34 ctf.js confuses sign bit.
|
36
|
-
CTYPE-35 Make the README more useful for getting started
|
37
|
-
CTYPE-36 want manual page on ctio functions
|
38
|
-
|
39
|
-
v0.3.1
|
40
|
-
CTYPE-29 Release 0.3.1
|
41
|
-
CTYPE-28 Want v0.6 npm support
|
42
|
-
|
43
|
-
v0.3.0
|
44
|
-
CTYPE-27 Release v0.3.0
|
45
|
-
CTYPE-26 Want alternate default char behavior
|
46
|
-
|
47
|
-
v0.2.1
|
48
|
-
CTYPE-25 Release v0.2.1
|
49
|
-
CTYPE-24 Writing structs is busted
|
50
|
-
|
51
|
-
v0.2.0:
|
52
|
-
CTYPE-23 Release v0.2.0
|
53
|
-
CTYPE-21 Add support for CTF JSON data
|
54
|
-
CTYPE-22 Add Javascriptlint profile
|
55
|
-
CTYPE-15 Pull in ctio updates from node/master
|
56
|
-
|
57
|
-
v0.1.0:
|
58
|
-
CTYPE-18 Bump version to v0.1.0
|
59
|
-
CTYPE-17 Fix nested structures
|
60
|
-
CTYPE-16 Remove extraneous logging
|
61
|
-
CTYPE-14 toAbs64 and toApprox64 are not exported
|
62
|
-
|
63
|
-
v0.0.3:
|
64
|
-
CTYPE-12 Bump version to v0.0.3
|
65
|
-
CTYPE-11 fix typo in wuint64
|
66
|
-
CTYPE-10 Integrate jsstyle
|
67
|
-
|
68
|
-
v0.0.2:
|
69
|
-
CTYPE-8 dump npm version to v0.0.2
|
70
|
-
CTYPE-9 want changelog
|
71
|
-
CTYPE-7 fix typo in detypes.
|
72
|
-
|
73
|
-
v0.0.1:
|
74
|
-
CTYPE-5 Missing from NPM registry
|
75
|
-
CTYPE-4 int16_t calls wrong read function
|
76
|
-
CTYPE-3 API example types are missing quotes as strings
|
77
|
-
CTYPE-2 doc missing 64-bit functions
|
78
|
-
CTYPE-1 Need license
|
@@ -1,82 +0,0 @@
|
|
1
|
-
Node-CType is a way to read and write binary data in structured and easy to use
|
2
|
-
format. Its name comes from the C header file.
|
3
|
-
|
4
|
-
To get started, simply clone the repository or use npm to install it. Once it is
|
5
|
-
there, simply require it.
|
6
|
-
|
7
|
-
git clone git://github.com/rmustacc/node-ctype
|
8
|
-
npm install ctype
|
9
|
-
var mod_ctype = require('ctype')
|
10
|
-
|
11
|
-
|
12
|
-
There are two APIs that you can use, depending on what abstraction you'd like.
|
13
|
-
The low level API let's you read and write individual integers and floats from
|
14
|
-
buffers. The higher level API let's you read and write structures of these. To
|
15
|
-
illustrate this, let's looks look at how we would read and write a binary
|
16
|
-
encoded x,y point.
|
17
|
-
|
18
|
-
In C we would define this structure as follows:
|
19
|
-
|
20
|
-
typedef struct point {
|
21
|
-
uint16_t p_x;
|
22
|
-
uint16_t p_y;
|
23
|
-
} point_t;
|
24
|
-
|
25
|
-
To read a binary encoded point from a Buffer, we first need to create a CType
|
26
|
-
parser (where we specify the endian and other options) and add the typedef.
|
27
|
-
|
28
|
-
var parser = new mod_ctype.Parser({ endian: 'big' });
|
29
|
-
parser.typedef('point_t', [
|
30
|
-
{ x: { type: 'uint16_t' } },
|
31
|
-
{ y: { type: 'uint16_t' } }
|
32
|
-
]);
|
33
|
-
|
34
|
-
From here, given a buffer buf and an offset into it, we can read a point.
|
35
|
-
|
36
|
-
var out = parser.readData([ { point: { type: 'point_t' } } ], buffer, 0);
|
37
|
-
console.log(out);
|
38
|
-
{ point: { x: 23, y: 42 } }
|
39
|
-
|
40
|
-
Another way to get the same information would be to use the low level methods.
|
41
|
-
Note that these require you to manually deal with the offset. Here's how we'd
|
42
|
-
get the same values of x and y from the buffer.
|
43
|
-
|
44
|
-
var x = mod_ctype.ruint16(buf, 'big', 0);
|
45
|
-
var y = mod_ctype.ruint16(buf, 'big', 2);
|
46
|
-
console.log(x + ', ' + y);
|
47
|
-
23, 42
|
48
|
-
|
49
|
-
The true power of this API comes from the ability to define and nest typedefs,
|
50
|
-
just as you would in C. By default, the following types are defined by default.
|
51
|
-
Note that they return a Number, unless indicated otherwise.
|
52
|
-
|
53
|
-
* int8_t
|
54
|
-
* int16_t
|
55
|
-
* int32_t
|
56
|
-
* int64_t (returns an array where val[0] << 32 + val[1] would be the value)
|
57
|
-
* uint8_t
|
58
|
-
* uint16_t
|
59
|
-
* uint32_t
|
60
|
-
* uint64_t (returns an array where val[0] << 32 + val[1] would be the value)
|
61
|
-
* float
|
62
|
-
* double
|
63
|
-
* char (either returns a buffer with that character or a uint8_t)
|
64
|
-
* char[] (returns an object with the buffer and the number of characters read which is either the total amount requested or until the first 0)
|
65
|
-
|
66
|
-
|
67
|
-
ctf2json integration:
|
68
|
-
|
69
|
-
Node-CType supports consuming the output of ctf2json. Once you read in a JSON file,
|
70
|
-
all you have to do to add all the definitions it contains is:
|
71
|
-
|
72
|
-
var data, parser;
|
73
|
-
data = JSON.parse(parsedJSONData);
|
74
|
-
parser = mod_ctype.parseCTF(data, { endian: 'big' });
|
75
|
-
|
76
|
-
For more documentation, see the file README.old. Full documentation is in the
|
77
|
-
process of being rewritten as a series of manual pages which will be available
|
78
|
-
in the repository and online for viewing.
|
79
|
-
|
80
|
-
To read the ctio manual page simple run, from the root of the workspace:
|
81
|
-
|
82
|
-
man -Mman -s 3ctype ctio
|