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
package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/package.json
RENAMED
@@ -1,40 +1,19 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
[
|
4
|
-
"inflight@^1.0.4",
|
5
|
-
"/Users/eshanker/Code/fsevents/node_modules/rimraf/node_modules/glob"
|
6
|
-
]
|
7
|
-
],
|
8
|
-
"_from": "inflight@>=1.0.4 <2.0.0",
|
2
|
+
"_from": "inflight@^1.0.4",
|
9
3
|
"_id": "inflight@1.0.4",
|
10
|
-
"
|
11
|
-
"_installable": true,
|
12
|
-
"_location": "/inflight",
|
4
|
+
"_location": "/rimraf/glob/inflight",
|
13
5
|
"_nodeVersion": "0.10.32",
|
14
6
|
"_npmUser": {
|
15
7
|
"email": "ogd@aoaioxxysz.net",
|
16
8
|
"name": "othiym23"
|
17
9
|
},
|
18
10
|
"_npmVersion": "2.1.3",
|
19
|
-
"_phantomChildren": {
|
20
|
-
"wrappy": "1.0.1"
|
21
|
-
},
|
22
|
-
"_requested": {
|
23
|
-
"name": "inflight",
|
24
|
-
"raw": "inflight@^1.0.4",
|
25
|
-
"rawSpec": "^1.0.4",
|
26
|
-
"scope": null,
|
27
|
-
"spec": ">=1.0.4 <2.0.0",
|
28
|
-
"type": "range"
|
29
|
-
},
|
11
|
+
"_phantomChildren": {},
|
30
12
|
"_requiredBy": [
|
31
13
|
"/rimraf/glob"
|
32
14
|
],
|
33
15
|
"_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz",
|
34
16
|
"_shasum": "6cbb4521ebd51ce0ec0a936bfd7657ef7e9b172a",
|
35
|
-
"_shrinkwrap": null,
|
36
|
-
"_spec": "inflight@^1.0.4",
|
37
|
-
"_where": "/Users/eshanker/Code/fsevents/node_modules/rimraf/node_modules/glob",
|
38
17
|
"author": {
|
39
18
|
"email": "i@izs.me",
|
40
19
|
"name": "Isaac Z. Schlueter",
|
@@ -76,9 +55,10 @@
|
|
76
55
|
],
|
77
56
|
"name": "inflight",
|
78
57
|
"optionalDependencies": {},
|
58
|
+
"readme": "ERROR: No README data found!",
|
79
59
|
"repository": {
|
80
60
|
"type": "git",
|
81
|
-
"url": "git://github.com/isaacs/inflight"
|
61
|
+
"url": "git://github.com/isaacs/inflight.git"
|
82
62
|
},
|
83
63
|
"scripts": {
|
84
64
|
"test": "tap test.js"
|
@@ -0,0 +1,16 @@
|
|
1
|
+
The ISC License
|
2
|
+
|
3
|
+
Copyright (c) Isaac Z. Schlueter
|
4
|
+
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
8
|
+
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
10
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
11
|
+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
12
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
13
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
14
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
15
|
+
PERFORMANCE OF THIS SOFTWARE.
|
16
|
+
|
@@ -0,0 +1,42 @@
|
|
1
|
+
Browser-friendly inheritance fully compatible with standard node.js
|
2
|
+
[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).
|
3
|
+
|
4
|
+
This package exports standard `inherits` from node.js `util` module in
|
5
|
+
node environment, but also provides alternative browser-friendly
|
6
|
+
implementation through [browser
|
7
|
+
field](https://gist.github.com/shtylman/4339901). Alternative
|
8
|
+
implementation is a literal copy of standard one located in standalone
|
9
|
+
module to avoid requiring of `util`. It also has a shim for old
|
10
|
+
browsers with no `Object.create` support.
|
11
|
+
|
12
|
+
While keeping you sure you are using standard `inherits`
|
13
|
+
implementation in node.js environment, it allows bundlers such as
|
14
|
+
[browserify](https://github.com/substack/node-browserify) to not
|
15
|
+
include full `util` package to your client code if all you need is
|
16
|
+
just `inherits` function. It worth, because browser shim for `util`
|
17
|
+
package is large and `inherits` is often the single function you need
|
18
|
+
from it.
|
19
|
+
|
20
|
+
It's recommended to use this package instead of
|
21
|
+
`require('util').inherits` for any code that has chances to be used
|
22
|
+
not only in node.js but in browser too.
|
23
|
+
|
24
|
+
## usage
|
25
|
+
|
26
|
+
```js
|
27
|
+
var inherits = require('inherits');
|
28
|
+
// then use exactly as the standard one
|
29
|
+
```
|
30
|
+
|
31
|
+
## note on version ~1.0
|
32
|
+
|
33
|
+
Version ~1.0 had completely different motivation and is not compatible
|
34
|
+
neither with 2.0 nor with standard node.js `inherits`.
|
35
|
+
|
36
|
+
If you are using version ~1.0 and planning to switch to ~2.0, be
|
37
|
+
careful:
|
38
|
+
|
39
|
+
* new version uses `super_` instead of `super` for referencing
|
40
|
+
superclass
|
41
|
+
* new version overwrites current prototype while old one preserves any
|
42
|
+
existing fields on it
|
@@ -0,0 +1 @@
|
|
1
|
+
module.exports = require('util').inherits
|
@@ -0,0 +1,23 @@
|
|
1
|
+
if (typeof Object.create === 'function') {
|
2
|
+
// implementation from standard node.js 'util' module
|
3
|
+
module.exports = function inherits(ctor, superCtor) {
|
4
|
+
ctor.super_ = superCtor
|
5
|
+
ctor.prototype = Object.create(superCtor.prototype, {
|
6
|
+
constructor: {
|
7
|
+
value: ctor,
|
8
|
+
enumerable: false,
|
9
|
+
writable: true,
|
10
|
+
configurable: true
|
11
|
+
}
|
12
|
+
});
|
13
|
+
};
|
14
|
+
} else {
|
15
|
+
// old school shim for old browsers
|
16
|
+
module.exports = function inherits(ctor, superCtor) {
|
17
|
+
ctor.super_ = superCtor
|
18
|
+
var TempCtor = function () {}
|
19
|
+
TempCtor.prototype = superCtor.prototype
|
20
|
+
ctor.prototype = new TempCtor()
|
21
|
+
ctor.prototype.constructor = ctor
|
22
|
+
}
|
23
|
+
}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
{
|
2
|
+
"_from": "inherits@2",
|
3
|
+
"_id": "inherits@2.0.1",
|
4
|
+
"_location": "/rimraf/glob/inherits",
|
5
|
+
"_npmUser": {
|
6
|
+
"email": "i@izs.me",
|
7
|
+
"name": "isaacs"
|
8
|
+
},
|
9
|
+
"_npmVersion": "1.3.8",
|
10
|
+
"_phantomChildren": {},
|
11
|
+
"_requiredBy": [
|
12
|
+
"/rimraf/glob"
|
13
|
+
],
|
14
|
+
"_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
|
15
|
+
"_shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1",
|
16
|
+
"browser": "./inherits_browser.js",
|
17
|
+
"bugs": {
|
18
|
+
"url": "https://github.com/isaacs/inherits/issues"
|
19
|
+
},
|
20
|
+
"dependencies": {},
|
21
|
+
"description": "Browser-friendly inheritance fully compatible with standard node.js inherits()",
|
22
|
+
"devDependencies": {},
|
23
|
+
"directories": {},
|
24
|
+
"dist": {
|
25
|
+
"shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1",
|
26
|
+
"tarball": "http://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz"
|
27
|
+
},
|
28
|
+
"homepage": "https://github.com/isaacs/inherits",
|
29
|
+
"keywords": [
|
30
|
+
"browser",
|
31
|
+
"browserify",
|
32
|
+
"class",
|
33
|
+
"inheritance",
|
34
|
+
"inherits",
|
35
|
+
"klass",
|
36
|
+
"object-oriented",
|
37
|
+
"oop"
|
38
|
+
],
|
39
|
+
"license": "ISC",
|
40
|
+
"main": "./inherits.js",
|
41
|
+
"maintainers": [
|
42
|
+
{
|
43
|
+
"name": "isaacs",
|
44
|
+
"email": "i@izs.me"
|
45
|
+
}
|
46
|
+
],
|
47
|
+
"name": "inherits",
|
48
|
+
"optionalDependencies": {},
|
49
|
+
"readme": "ERROR: No README data found!",
|
50
|
+
"repository": {
|
51
|
+
"type": "git",
|
52
|
+
"url": "git://github.com/isaacs/inherits.git"
|
53
|
+
},
|
54
|
+
"scripts": {
|
55
|
+
"test": "node test"
|
56
|
+
},
|
57
|
+
"version": "2.0.1"
|
58
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
var inherits = require('./inherits.js')
|
2
|
+
var assert = require('assert')
|
3
|
+
|
4
|
+
function test(c) {
|
5
|
+
assert(c.constructor === Child)
|
6
|
+
assert(c.constructor.super_ === Parent)
|
7
|
+
assert(Object.getPrototypeOf(c) === Child.prototype)
|
8
|
+
assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype)
|
9
|
+
assert(c instanceof Child)
|
10
|
+
assert(c instanceof Parent)
|
11
|
+
}
|
12
|
+
|
13
|
+
function Child() {
|
14
|
+
Parent.call(this)
|
15
|
+
test(this)
|
16
|
+
}
|
17
|
+
|
18
|
+
function Parent() {}
|
19
|
+
|
20
|
+
inherits(Child, Parent)
|
21
|
+
|
22
|
+
var c = new Child
|
23
|
+
test(c)
|
24
|
+
|
25
|
+
console.log('ok')
|
@@ -0,0 +1,122 @@
|
|
1
|
+
# brace-expansion
|
2
|
+
|
3
|
+
[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html),
|
4
|
+
as known from sh/bash, in JavaScript.
|
5
|
+
|
6
|
+
[](http://travis-ci.org/juliangruber/brace-expansion)
|
7
|
+
[](https://www.npmjs.org/package/brace-expansion)
|
8
|
+
|
9
|
+
[](https://ci.testling.com/juliangruber/brace-expansion)
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```js
|
14
|
+
var expand = require('brace-expansion');
|
15
|
+
|
16
|
+
expand('file-{a,b,c}.jpg')
|
17
|
+
// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
|
18
|
+
|
19
|
+
expand('-v{,,}')
|
20
|
+
// => ['-v', '-v', '-v']
|
21
|
+
|
22
|
+
expand('file{0..2}.jpg')
|
23
|
+
// => ['file0.jpg', 'file1.jpg', 'file2.jpg']
|
24
|
+
|
25
|
+
expand('file-{a..c}.jpg')
|
26
|
+
// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
|
27
|
+
|
28
|
+
expand('file{2..0}.jpg')
|
29
|
+
// => ['file2.jpg', 'file1.jpg', 'file0.jpg']
|
30
|
+
|
31
|
+
expand('file{0..4..2}.jpg')
|
32
|
+
// => ['file0.jpg', 'file2.jpg', 'file4.jpg']
|
33
|
+
|
34
|
+
expand('file-{a..e..2}.jpg')
|
35
|
+
// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg']
|
36
|
+
|
37
|
+
expand('file{00..10..5}.jpg')
|
38
|
+
// => ['file00.jpg', 'file05.jpg', 'file10.jpg']
|
39
|
+
|
40
|
+
expand('{{A..C},{a..c}}')
|
41
|
+
// => ['A', 'B', 'C', 'a', 'b', 'c']
|
42
|
+
|
43
|
+
expand('ppp{,config,oe{,conf}}')
|
44
|
+
// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf']
|
45
|
+
```
|
46
|
+
|
47
|
+
## API
|
48
|
+
|
49
|
+
```js
|
50
|
+
var expand = require('brace-expansion');
|
51
|
+
```
|
52
|
+
|
53
|
+
### var expanded = expand(str)
|
54
|
+
|
55
|
+
Return an array of all possible and valid expansions of `str`. If none are
|
56
|
+
found, `[str]` is returned.
|
57
|
+
|
58
|
+
Valid expansions are:
|
59
|
+
|
60
|
+
```js
|
61
|
+
/^(.*,)+(.+)?$/
|
62
|
+
// {a,b,...}
|
63
|
+
```
|
64
|
+
|
65
|
+
A comma seperated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.
|
66
|
+
|
67
|
+
```js
|
68
|
+
/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
|
69
|
+
// {x..y[..incr]}
|
70
|
+
```
|
71
|
+
|
72
|
+
A numeric sequence from `x` to `y` inclusive, with optional increment.
|
73
|
+
If `x` or `y` start with a leading `0`, all the numbers will be padded
|
74
|
+
to have equal length. Negative numbers and backwards iteration work too.
|
75
|
+
|
76
|
+
```js
|
77
|
+
/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
|
78
|
+
// {x..y[..incr]}
|
79
|
+
```
|
80
|
+
|
81
|
+
An alphabetic sequence from `x` to `y` inclusive, with optional increment.
|
82
|
+
`x` and `y` must be exactly one character, and if given, `incr` must be a
|
83
|
+
number.
|
84
|
+
|
85
|
+
For compatibility reasons, the string `${` is not eligible for brace expansion.
|
86
|
+
|
87
|
+
## Installation
|
88
|
+
|
89
|
+
With [npm](https://npmjs.org) do:
|
90
|
+
|
91
|
+
```bash
|
92
|
+
npm install brace-expansion
|
93
|
+
```
|
94
|
+
|
95
|
+
## Contributors
|
96
|
+
|
97
|
+
- [Julian Gruber](https://github.com/juliangruber)
|
98
|
+
- [Isaac Z. Schlueter](https://github.com/isaacs)
|
99
|
+
|
100
|
+
## License
|
101
|
+
|
102
|
+
(MIT)
|
103
|
+
|
104
|
+
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
|
105
|
+
|
106
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
107
|
+
this software and associated documentation files (the "Software"), to deal in
|
108
|
+
the Software without restriction, including without limitation the rights to
|
109
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
110
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
111
|
+
so, subject to the following conditions:
|
112
|
+
|
113
|
+
The above copyright notice and this permission notice shall be included in all
|
114
|
+
copies or substantial portions of the Software.
|
115
|
+
|
116
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
117
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
118
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
119
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
120
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
121
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
122
|
+
SOFTWARE.
|
@@ -0,0 +1,8 @@
|
|
1
|
+
var expand = require('./');
|
2
|
+
|
3
|
+
console.log(expand('http://any.org/archive{1996..1999}/vol{1..4}/part{a,b,c}.html'));
|
4
|
+
console.log(expand('http://www.numericals.com/file{1..100..10}.txt'));
|
5
|
+
console.log(expand('http://www.letters.com/file{a..z..2}.txt'));
|
6
|
+
console.log(expand('mkdir /usr/local/src/bash/{old,new,dist,bugs}'));
|
7
|
+
console.log(expand('chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}}'));
|
8
|
+
|
@@ -0,0 +1,191 @@
|
|
1
|
+
var concatMap = require('concat-map');
|
2
|
+
var balanced = require('balanced-match');
|
3
|
+
|
4
|
+
module.exports = expandTop;
|
5
|
+
|
6
|
+
var escSlash = '\0SLASH'+Math.random()+'\0';
|
7
|
+
var escOpen = '\0OPEN'+Math.random()+'\0';
|
8
|
+
var escClose = '\0CLOSE'+Math.random()+'\0';
|
9
|
+
var escComma = '\0COMMA'+Math.random()+'\0';
|
10
|
+
var escPeriod = '\0PERIOD'+Math.random()+'\0';
|
11
|
+
|
12
|
+
function numeric(str) {
|
13
|
+
return parseInt(str, 10) == str
|
14
|
+
? parseInt(str, 10)
|
15
|
+
: str.charCodeAt(0);
|
16
|
+
}
|
17
|
+
|
18
|
+
function escapeBraces(str) {
|
19
|
+
return str.split('\\\\').join(escSlash)
|
20
|
+
.split('\\{').join(escOpen)
|
21
|
+
.split('\\}').join(escClose)
|
22
|
+
.split('\\,').join(escComma)
|
23
|
+
.split('\\.').join(escPeriod);
|
24
|
+
}
|
25
|
+
|
26
|
+
function unescapeBraces(str) {
|
27
|
+
return str.split(escSlash).join('\\')
|
28
|
+
.split(escOpen).join('{')
|
29
|
+
.split(escClose).join('}')
|
30
|
+
.split(escComma).join(',')
|
31
|
+
.split(escPeriod).join('.');
|
32
|
+
}
|
33
|
+
|
34
|
+
|
35
|
+
// Basically just str.split(","), but handling cases
|
36
|
+
// where we have nested braced sections, which should be
|
37
|
+
// treated as individual members, like {a,{b,c},d}
|
38
|
+
function parseCommaParts(str) {
|
39
|
+
if (!str)
|
40
|
+
return [''];
|
41
|
+
|
42
|
+
var parts = [];
|
43
|
+
var m = balanced('{', '}', str);
|
44
|
+
|
45
|
+
if (!m)
|
46
|
+
return str.split(',');
|
47
|
+
|
48
|
+
var pre = m.pre;
|
49
|
+
var body = m.body;
|
50
|
+
var post = m.post;
|
51
|
+
var p = pre.split(',');
|
52
|
+
|
53
|
+
p[p.length-1] += '{' + body + '}';
|
54
|
+
var postParts = parseCommaParts(post);
|
55
|
+
if (post.length) {
|
56
|
+
p[p.length-1] += postParts.shift();
|
57
|
+
p.push.apply(p, postParts);
|
58
|
+
}
|
59
|
+
|
60
|
+
parts.push.apply(parts, p);
|
61
|
+
|
62
|
+
return parts;
|
63
|
+
}
|
64
|
+
|
65
|
+
function expandTop(str) {
|
66
|
+
if (!str)
|
67
|
+
return [];
|
68
|
+
|
69
|
+
return expand(escapeBraces(str), true).map(unescapeBraces);
|
70
|
+
}
|
71
|
+
|
72
|
+
function identity(e) {
|
73
|
+
return e;
|
74
|
+
}
|
75
|
+
|
76
|
+
function embrace(str) {
|
77
|
+
return '{' + str + '}';
|
78
|
+
}
|
79
|
+
function isPadded(el) {
|
80
|
+
return /^-?0\d/.test(el);
|
81
|
+
}
|
82
|
+
|
83
|
+
function lte(i, y) {
|
84
|
+
return i <= y;
|
85
|
+
}
|
86
|
+
function gte(i, y) {
|
87
|
+
return i >= y;
|
88
|
+
}
|
89
|
+
|
90
|
+
function expand(str, isTop) {
|
91
|
+
var expansions = [];
|
92
|
+
|
93
|
+
var m = balanced('{', '}', str);
|
94
|
+
if (!m || /\$$/.test(m.pre)) return [str];
|
95
|
+
|
96
|
+
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
97
|
+
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
98
|
+
var isSequence = isNumericSequence || isAlphaSequence;
|
99
|
+
var isOptions = /^(.*,)+(.+)?$/.test(m.body);
|
100
|
+
if (!isSequence && !isOptions) {
|
101
|
+
// {a},b}
|
102
|
+
if (m.post.match(/,.*}/)) {
|
103
|
+
str = m.pre + '{' + m.body + escClose + m.post;
|
104
|
+
return expand(str);
|
105
|
+
}
|
106
|
+
return [str];
|
107
|
+
}
|
108
|
+
|
109
|
+
var n;
|
110
|
+
if (isSequence) {
|
111
|
+
n = m.body.split(/\.\./);
|
112
|
+
} else {
|
113
|
+
n = parseCommaParts(m.body);
|
114
|
+
if (n.length === 1) {
|
115
|
+
// x{{a,b}}y ==> x{a}y x{b}y
|
116
|
+
n = expand(n[0], false).map(embrace);
|
117
|
+
if (n.length === 1) {
|
118
|
+
var post = m.post.length
|
119
|
+
? expand(m.post, false)
|
120
|
+
: [''];
|
121
|
+
return post.map(function(p) {
|
122
|
+
return m.pre + n[0] + p;
|
123
|
+
});
|
124
|
+
}
|
125
|
+
}
|
126
|
+
}
|
127
|
+
|
128
|
+
// at this point, n is the parts, and we know it's not a comma set
|
129
|
+
// with a single entry.
|
130
|
+
|
131
|
+
// no need to expand pre, since it is guaranteed to be free of brace-sets
|
132
|
+
var pre = m.pre;
|
133
|
+
var post = m.post.length
|
134
|
+
? expand(m.post, false)
|
135
|
+
: [''];
|
136
|
+
|
137
|
+
var N;
|
138
|
+
|
139
|
+
if (isSequence) {
|
140
|
+
var x = numeric(n[0]);
|
141
|
+
var y = numeric(n[1]);
|
142
|
+
var width = Math.max(n[0].length, n[1].length)
|
143
|
+
var incr = n.length == 3
|
144
|
+
? Math.abs(numeric(n[2]))
|
145
|
+
: 1;
|
146
|
+
var test = lte;
|
147
|
+
var reverse = y < x;
|
148
|
+
if (reverse) {
|
149
|
+
incr *= -1;
|
150
|
+
test = gte;
|
151
|
+
}
|
152
|
+
var pad = n.some(isPadded);
|
153
|
+
|
154
|
+
N = [];
|
155
|
+
|
156
|
+
for (var i = x; test(i, y); i += incr) {
|
157
|
+
var c;
|
158
|
+
if (isAlphaSequence) {
|
159
|
+
c = String.fromCharCode(i);
|
160
|
+
if (c === '\\')
|
161
|
+
c = '';
|
162
|
+
} else {
|
163
|
+
c = String(i);
|
164
|
+
if (pad) {
|
165
|
+
var need = width - c.length;
|
166
|
+
if (need > 0) {
|
167
|
+
var z = new Array(need + 1).join('0');
|
168
|
+
if (i < 0)
|
169
|
+
c = '-' + z + c.slice(1);
|
170
|
+
else
|
171
|
+
c = z + c;
|
172
|
+
}
|
173
|
+
}
|
174
|
+
}
|
175
|
+
N.push(c);
|
176
|
+
}
|
177
|
+
} else {
|
178
|
+
N = concatMap(n, function(el) { return expand(el, false) });
|
179
|
+
}
|
180
|
+
|
181
|
+
for (var j = 0; j < N.length; j++) {
|
182
|
+
for (var k = 0; k < post.length; k++) {
|
183
|
+
var expansion = pre + N[j] + post[k];
|
184
|
+
if (!isTop || isSequence || expansion)
|
185
|
+
expansions.push(expansion);
|
186
|
+
}
|
187
|
+
}
|
188
|
+
|
189
|
+
return expansions;
|
190
|
+
}
|
191
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
(MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
7
|
+
the Software without restriction, including without limitation the rights to
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
9
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
10
|
+
so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
@@ -0,0 +1,80 @@
|
|
1
|
+
# balanced-match
|
2
|
+
|
3
|
+
Match balanced string pairs, like `{` and `}` or `<b>` and `</b>`.
|
4
|
+
|
5
|
+
[](http://travis-ci.org/juliangruber/balanced-match)
|
6
|
+
[](https://www.npmjs.org/package/balanced-match)
|
7
|
+
|
8
|
+
[](https://ci.testling.com/juliangruber/balanced-match)
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
Get the first matching pair of braces:
|
13
|
+
|
14
|
+
```js
|
15
|
+
var balanced = require('balanced-match');
|
16
|
+
|
17
|
+
console.log(balanced('{', '}', 'pre{in{nested}}post'));
|
18
|
+
console.log(balanced('{', '}', 'pre{first}between{second}post'));
|
19
|
+
```
|
20
|
+
|
21
|
+
The matches are:
|
22
|
+
|
23
|
+
```bash
|
24
|
+
$ node example.js
|
25
|
+
{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' }
|
26
|
+
{ start: 3,
|
27
|
+
end: 9,
|
28
|
+
pre: 'pre',
|
29
|
+
body: 'first',
|
30
|
+
post: 'between{second}post' }
|
31
|
+
```
|
32
|
+
|
33
|
+
## API
|
34
|
+
|
35
|
+
### var m = balanced(a, b, str)
|
36
|
+
|
37
|
+
For the first non-nested matching pair of `a` and `b` in `str`, return an
|
38
|
+
object with those keys:
|
39
|
+
|
40
|
+
* **start** the index of the first match of `a`
|
41
|
+
* **end** the index of the matching `b`
|
42
|
+
* **pre** the preamble, `a` and `b` not included
|
43
|
+
* **body** the match, `a` and `b` not included
|
44
|
+
* **post** the postscript, `a` and `b` not included
|
45
|
+
|
46
|
+
If there's no match, `undefined` will be returned.
|
47
|
+
|
48
|
+
If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']`.
|
49
|
+
|
50
|
+
## Installation
|
51
|
+
|
52
|
+
With [npm](https://npmjs.org) do:
|
53
|
+
|
54
|
+
```bash
|
55
|
+
npm install balanced-match
|
56
|
+
```
|
57
|
+
|
58
|
+
## License
|
59
|
+
|
60
|
+
(MIT)
|
61
|
+
|
62
|
+
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
|
63
|
+
|
64
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
65
|
+
this software and associated documentation files (the "Software"), to deal in
|
66
|
+
the Software without restriction, including without limitation the rights to
|
67
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
68
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
69
|
+
so, subject to the following conditions:
|
70
|
+
|
71
|
+
The above copyright notice and this permission notice shall be included in all
|
72
|
+
copies or substantial portions of the Software.
|
73
|
+
|
74
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
75
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
76
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
77
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
78
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
79
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
80
|
+
SOFTWARE.
|