fsevents 1.0.15 → 1.1.1
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/fsevents.js +3 -0
- package/install.js +7 -0
- package/lib/binding/Release/node-v48-darwin-x64/fse.node +0 -0
- package/node_modules/abbrev/abbrev.js +0 -1
- package/node_modules/abbrev/package.json +32 -21
- package/node_modules/ansi-regex/index.js +1 -1
- package/node_modules/ansi-regex/package.json +61 -42
- package/node_modules/ansi-regex/readme.md +10 -2
- package/node_modules/ansi-styles/package.json +27 -19
- package/node_modules/aproba/README.md +33 -3
- package/node_modules/aproba/index.js +71 -30
- package/node_modules/aproba/package.json +30 -22
- package/node_modules/are-we-there-yet/package.json +14 -6
- package/node_modules/asn1/package.json +16 -8
- package/node_modules/assert-plus/package.json +16 -8
- package/node_modules/{node-uuid/LICENSE.md → asynckit/LICENSE} +1 -1
- package/node_modules/asynckit/README.md +233 -0
- package/node_modules/asynckit/bench.js +76 -0
- package/node_modules/asynckit/index.js +6 -0
- package/node_modules/asynckit/lib/abort.js +29 -0
- package/node_modules/asynckit/lib/async.js +34 -0
- package/node_modules/asynckit/lib/defer.js +26 -0
- package/node_modules/asynckit/lib/iterate.js +75 -0
- package/node_modules/asynckit/lib/readable_asynckit.js +91 -0
- package/node_modules/asynckit/lib/readable_parallel.js +25 -0
- package/node_modules/asynckit/lib/readable_serial.js +25 -0
- package/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
- package/node_modules/asynckit/lib/state.js +37 -0
- package/node_modules/asynckit/lib/streamify.js +141 -0
- package/node_modules/asynckit/lib/terminator.js +29 -0
- package/node_modules/asynckit/package.json +126 -0
- package/node_modules/asynckit/parallel.js +43 -0
- package/node_modules/asynckit/serial.js +17 -0
- package/node_modules/asynckit/serialOrdered.js +75 -0
- package/node_modules/asynckit/stream.js +21 -0
- package/node_modules/aws-sign2/package.json +15 -7
- package/node_modules/aws4/README.md +9 -0
- package/node_modules/aws4/aws4.js +21 -7
- package/node_modules/aws4/package.json +62 -54
- package/node_modules/balanced-match/package.json +27 -19
- package/node_modules/bcrypt-pbkdf/README.md +39 -0
- package/node_modules/bcrypt-pbkdf/index.js +556 -0
- package/node_modules/bcrypt-pbkdf/package.json +84 -0
- package/node_modules/block-stream/package.json +15 -7
- package/node_modules/boom/package.json +14 -6
- package/node_modules/brace-expansion/index.js +10 -0
- package/node_modules/brace-expansion/package.json +35 -27
- package/node_modules/buffer-shims/package.json +16 -7
- package/node_modules/caseless/package.json +18 -10
- package/node_modules/chalk/package.json +30 -22
- package/node_modules/code-point-at/index.js +3 -4
- package/node_modules/code-point-at/package.json +40 -30
- package/node_modules/code-point-at/readme.md +2 -4
- package/node_modules/combined-stream/package.json +15 -7
- package/node_modules/commander/package.json +16 -8
- package/node_modules/concat-map/package.json +30 -22
- package/node_modules/console-control-strings/package.json +15 -7
- package/node_modules/core-util-is/package.json +22 -14
- package/node_modules/cryptiles/package.json +14 -6
- package/node_modules/dashdash/CHANGES.md +364 -0
- package/node_modules/dashdash/LICENSE.txt +24 -0
- package/node_modules/dashdash/etc/dashdash.bash_completion.in +4 -3
- package/node_modules/dashdash/node_modules/assert-plus/package.json +16 -8
- package/node_modules/dashdash/package.json +33 -24
- package/node_modules/debug/package.json +20 -12
- package/node_modules/deep-extend/package.json +23 -15
- package/node_modules/delayed-stream/package.json +15 -7
- package/node_modules/delegates/package.json +14 -6
- package/node_modules/ecc-jsbn/package.json +17 -9
- package/node_modules/escape-string-regexp/package.json +20 -12
- package/node_modules/extend/package.json +16 -8
- package/node_modules/extsprintf/package.json +14 -6
- package/node_modules/forever-agent/package.json +15 -7
- package/node_modules/form-data/README.md +7 -8
- package/node_modules/form-data/lib/browser.js +1 -1
- package/node_modules/form-data/lib/form_data.js +101 -72
- package/node_modules/form-data/lib/populate.js +6 -5
- package/node_modules/form-data/package.json +68 -52
- package/node_modules/fs.realpath/package.json +19 -11
- package/node_modules/fstream/package.json +15 -7
- package/node_modules/fstream-ignore/package.json +15 -7
- package/node_modules/gauge/CHANGELOG.md +24 -0
- package/node_modules/gauge/README.md +4 -0
- package/node_modules/gauge/index.js +16 -9
- package/node_modules/gauge/package.json +37 -29
- package/node_modules/generate-function/package.json +16 -8
- package/node_modules/generate-object-property/package.json +14 -6
- package/node_modules/getpass/node_modules/assert-plus/package.json +16 -8
- package/node_modules/getpass/package.json +16 -8
- package/node_modules/glob/README.md +3 -0
- package/node_modules/glob/common.js +6 -1
- package/node_modules/glob/glob.js +23 -14
- package/node_modules/glob/package.json +29 -21
- package/node_modules/glob/sync.js +29 -11
- package/node_modules/graceful-fs/README.md +1 -1
- package/node_modules/graceful-fs/graceful-fs.js +23 -14
- package/node_modules/graceful-fs/package.json +35 -27
- package/node_modules/graceful-fs/polyfills.js +99 -21
- package/node_modules/graceful-readlink/package.json +14 -6
- package/node_modules/har-validator/package.json +16 -8
- package/node_modules/has-ansi/package.json +29 -21
- package/node_modules/has-unicode/package.json +18 -10
- package/node_modules/hawk/package.json +18 -10
- package/node_modules/hoek/package.json +14 -6
- package/node_modules/http-signature/package.json +14 -6
- package/node_modules/inflight/inflight.js +22 -12
- package/node_modules/inflight/package.json +28 -20
- package/node_modules/inherits/inherits.js +7 -1
- package/node_modules/inherits/package.json +41 -21
- package/node_modules/ini/package.json +15 -7
- package/node_modules/is-fullwidth-code-point/package.json +27 -19
- package/node_modules/is-my-json-valid/index.js +10 -0
- package/node_modules/is-my-json-valid/package.json +36 -20
- package/node_modules/is-my-json-valid/test/misc.js +24 -0
- package/node_modules/is-property/package.json +19 -11
- package/node_modules/is-typedarray/package.json +16 -8
- package/node_modules/isarray/package.json +28 -20
- package/node_modules/isstream/package.json +19 -11
- package/node_modules/jodid25519/package.json +18 -10
- package/node_modules/jsbn/index.js +8 -9
- package/node_modules/jsbn/package.json +30 -18
- package/node_modules/json-schema/lib/links.js +17 -3
- package/node_modules/json-schema/lib/validate.js +18 -5
- package/node_modules/json-schema/package.json +32 -18
- package/node_modules/json-stringify-safe/package.json +18 -10
- package/node_modules/{async/LICENSE → jsonpointer/LICENSE.md} +3 -1
- package/node_modules/jsonpointer/README.md +17 -10
- package/node_modules/jsonpointer/jsonpointer.js +73 -56
- package/node_modules/jsonpointer/package.json +47 -26
- package/node_modules/jsprim/CHANGES.md +4 -0
- package/node_modules/jsprim/package.json +25 -17
- package/node_modules/mime-db/HISTORY.md +50 -0
- package/node_modules/mime-db/db.json +126 -2
- package/node_modules/mime-db/package.json +43 -30
- package/node_modules/mime-types/HISTORY.md +19 -0
- package/node_modules/mime-types/index.js +8 -8
- package/node_modules/mime-types/package.json +32 -19
- package/node_modules/minimatch/minimatch.js +19 -20
- package/node_modules/minimatch/package.json +25 -17
- package/node_modules/minimist/package.json +24 -16
- package/node_modules/mkdirp/package.json +21 -13
- package/node_modules/ms/package.json +14 -6
- package/node_modules/node-pre-gyp/CHANGELOG.md +20 -0
- package/node_modules/node-pre-gyp/README.md +574 -0
- package/node_modules/node-pre-gyp/appveyor.yml +19 -9
- package/node_modules/node-pre-gyp/lib/install.js +31 -7
- package/node_modules/node-pre-gyp/lib/node-pre-gyp.js +3 -1
- package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +140 -0
- package/node_modules/node-pre-gyp/package.json +52 -48
- package/node_modules/nopt/package.json +19 -11
- package/node_modules/npmlog/CHANGELOG.md +9 -0
- package/node_modules/npmlog/README.md +7 -1
- package/node_modules/npmlog/log.js +12 -8
- package/node_modules/npmlog/package.json +30 -22
- package/node_modules/number-is-nan/package.json +39 -30
- package/node_modules/number-is-nan/readme.md +1 -3
- package/node_modules/oauth-sign/package.json +15 -7
- package/node_modules/object-assign/index.js +11 -4
- package/node_modules/object-assign/package.json +42 -30
- package/node_modules/object-assign/readme.md +8 -3
- package/node_modules/once/README.md +28 -0
- package/node_modules/once/once.js +21 -0
- package/node_modules/once/package.json +31 -20
- package/node_modules/path-is-absolute/index.js +5 -5
- package/node_modules/path-is-absolute/package.json +45 -31
- package/node_modules/path-is-absolute/readme.md +19 -11
- package/node_modules/pinkie/package.json +18 -10
- package/node_modules/pinkie-promise/package.json +18 -10
- package/node_modules/process-nextick-args/package.json +16 -8
- package/node_modules/punycode/LICENSE-MIT.txt +20 -0
- package/node_modules/punycode/README.md +176 -0
- package/node_modules/punycode/package.json +127 -0
- package/node_modules/punycode/punycode.js +533 -0
- package/node_modules/qs/.eslintrc +15 -15
- package/node_modules/qs/CHANGELOG.md +36 -0
- package/node_modules/qs/README.md +431 -0
- package/node_modules/qs/dist/qs.js +167 -67
- package/node_modules/qs/lib/formats.js +18 -0
- package/node_modules/qs/lib/index.js +6 -4
- package/node_modules/qs/lib/parse.js +31 -32
- package/node_modules/qs/lib/stringify.js +83 -20
- package/node_modules/qs/lib/utils.js +23 -7
- package/node_modules/qs/package.json +40 -30
- package/node_modules/qs/test/.eslintrc +10 -0
- package/node_modules/qs/test/index.js +2 -0
- package/node_modules/qs/test/parse.js +108 -47
- package/node_modules/qs/test/stringify.js +261 -28
- package/node_modules/qs/test/utils.js +13 -0
- package/node_modules/rc/node_modules/minimist/package.json +24 -16
- package/node_modules/rc/package.json +35 -23
- package/node_modules/readable-stream/.npmignore +1 -0
- package/node_modules/readable-stream/.travis.yml +2 -7
- package/node_modules/readable-stream/README.md +6 -2
- package/node_modules/readable-stream/lib/_stream_readable.js +158 -110
- package/node_modules/readable-stream/lib/_stream_transform.js +7 -5
- package/node_modules/readable-stream/lib/_stream_writable.js +35 -7
- package/node_modules/readable-stream/lib/internal/streams/BufferList.js +64 -0
- package/node_modules/readable-stream/package.json +34 -26
- package/node_modules/request/CHANGELOG.md +49 -18
- package/node_modules/request/README.md +3 -2
- package/node_modules/request/index.js +2 -3
- package/node_modules/request/lib/auth.js +1 -1
- package/node_modules/request/lib/helpers.js +4 -13
- package/node_modules/request/lib/multipart.js +1 -1
- package/node_modules/request/lib/oauth.js +1 -1
- package/node_modules/request/lib/redirect.js +5 -1
- package/node_modules/request/package.json +50 -31
- package/node_modules/request/request.js +84 -43
- package/node_modules/rimraf/package.json +28 -20
- package/node_modules/rimraf/rimraf.js +2 -2
- package/node_modules/semver/README.md +4 -0
- package/node_modules/semver/package.json +27 -19
- package/node_modules/semver/semver.js +14 -5
- package/node_modules/set-blocking/package.json +21 -13
- package/node_modules/signal-exit/CHANGELOG.md +10 -0
- package/node_modules/signal-exit/LICENSE.txt +2 -0
- package/node_modules/signal-exit/index.js +9 -0
- package/node_modules/signal-exit/package.json +32 -24
- package/node_modules/signal-exit/signals.js +5 -4
- package/node_modules/sntp/package.json +16 -8
- package/node_modules/sshpk/README.md +214 -3
- package/node_modules/sshpk/bin/sshpk-conv +6 -0
- package/node_modules/sshpk/lib/certificate.js +291 -0
- package/node_modules/sshpk/lib/errors.js +14 -1
- package/node_modules/sshpk/lib/fingerprint.js +28 -7
- package/node_modules/sshpk/lib/formats/openssh-cert.js +289 -0
- package/node_modules/sshpk/lib/formats/pem.js +2 -2
- package/node_modules/sshpk/lib/formats/pkcs8.js +2 -7
- package/node_modules/sshpk/lib/formats/ssh-private.js +140 -17
- package/node_modules/sshpk/lib/formats/x509-pem.js +77 -0
- package/node_modules/sshpk/lib/formats/x509.js +484 -0
- package/node_modules/sshpk/lib/identity.js +277 -0
- package/node_modules/sshpk/lib/index.js +13 -1
- package/node_modules/sshpk/lib/key.js +1 -0
- package/node_modules/sshpk/lib/signature.js +14 -6
- package/node_modules/sshpk/lib/ssh-buffer.js +24 -0
- package/node_modules/sshpk/lib/utils.js +43 -1
- package/node_modules/sshpk/node_modules/assert-plus/package.json +16 -8
- package/node_modules/sshpk/package.json +32 -22
- package/node_modules/string-width/index.js +5 -0
- package/node_modules/string-width/package.json +49 -36
- package/node_modules/string-width/readme.md +4 -3
- package/node_modules/string_decoder/package.json +19 -11
- package/node_modules/stringstream/package.json +18 -10
- package/node_modules/strip-ansi/package.json +29 -21
- package/node_modules/strip-json-comments/index.js +70 -0
- package/node_modules/strip-json-comments/package.json +49 -43
- package/node_modules/strip-json-comments/readme.md +12 -28
- package/node_modules/supports-color/package.json +26 -18
- package/node_modules/tar/package.json +19 -11
- package/node_modules/tar-pack/README.md +4 -1
- package/node_modules/tar-pack/index.js +17 -12
- package/node_modules/tar-pack/node_modules/once/LICENSE +15 -0
- package/node_modules/tar-pack/node_modules/once/README.md +51 -0
- package/node_modules/tar-pack/node_modules/once/once.js +21 -0
- package/node_modules/tar-pack/node_modules/once/package.json +96 -0
- package/node_modules/tar-pack/node_modules/readable-stream/.npmignore +8 -0
- package/node_modules/{bl → tar-pack}/node_modules/readable-stream/.travis.yml +4 -7
- package/node_modules/{bl → tar-pack}/node_modules/readable-stream/LICENSE +0 -0
- package/node_modules/{bl → tar-pack}/node_modules/readable-stream/README.md +2 -2
- package/node_modules/tar-pack/node_modules/readable-stream/doc/stream.md +2015 -0
- package/node_modules/{bl → tar-pack}/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +0 -0
- package/node_modules/{bl → tar-pack}/node_modules/readable-stream/duplex.js +0 -0
- package/node_modules/{bl → tar-pack}/node_modules/readable-stream/lib/_stream_duplex.js +0 -0
- package/node_modules/{bl → tar-pack}/node_modules/readable-stream/lib/_stream_passthrough.js +0 -0
- package/node_modules/{bl → tar-pack}/node_modules/readable-stream/lib/_stream_readable.js +164 -107
- package/node_modules/{bl → tar-pack}/node_modules/readable-stream/lib/_stream_transform.js +3 -3
- package/node_modules/{bl → tar-pack}/node_modules/readable-stream/lib/_stream_writable.js +25 -15
- package/node_modules/tar-pack/node_modules/readable-stream/lib/internal/streams/BufferList.js +64 -0
- package/node_modules/{bl → tar-pack}/node_modules/readable-stream/package.json +50 -30
- package/node_modules/{bl → tar-pack}/node_modules/readable-stream/passthrough.js +0 -0
- package/node_modules/{bl → tar-pack}/node_modules/readable-stream/readable.js +4 -0
- package/node_modules/{bl → tar-pack}/node_modules/readable-stream/transform.js +0 -0
- package/node_modules/{bl → tar-pack}/node_modules/readable-stream/writable.js +0 -0
- package/node_modules/tar-pack/package.json +39 -22
- package/node_modules/tar-pack/test/index.js +43 -1
- package/node_modules/tough-cookie/README.md +17 -3
- package/node_modules/tough-cookie/lib/cookie.js +6 -12
- package/node_modules/tough-cookie/package.json +50 -35
- package/node_modules/tunnel-agent/package.json +15 -7
- package/node_modules/tweetnacl/AUTHORS.md +28 -0
- package/node_modules/tweetnacl/CHANGELOG.md +93 -0
- package/node_modules/tweetnacl/LICENSE +24 -0
- package/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md +20 -0
- package/node_modules/tweetnacl/README.md +57 -61
- package/node_modules/tweetnacl/nacl-fast.js +22 -52
- package/node_modules/tweetnacl/nacl-fast.min.js +2 -2
- package/node_modules/tweetnacl/nacl.d.ts +98 -0
- package/node_modules/tweetnacl/nacl.js +21 -51
- package/node_modules/tweetnacl/nacl.min.js +1 -1
- package/node_modules/tweetnacl/package.json +47 -46
- package/node_modules/uid-number/package.json +15 -7
- package/node_modules/util-deprecate/package.json +21 -13
- package/node_modules/uuid/.npmignore +8 -0
- package/node_modules/uuid/.travis.yml +5 -0
- package/node_modules/uuid/AUTHORS +5 -0
- package/node_modules/uuid/HISTORY.md +28 -0
- package/node_modules/uuid/LICENSE.md +21 -0
- package/node_modules/uuid/README.md +132 -0
- package/node_modules/{node-uuid → uuid}/bin/uuid +0 -0
- package/node_modules/uuid/index.js +8 -0
- package/node_modules/uuid/lib/bytesToUuid.js +23 -0
- package/node_modules/uuid/lib/rng-browser.js +33 -0
- package/node_modules/uuid/lib/rng.js +10 -0
- package/node_modules/uuid/package.json +122 -0
- package/node_modules/uuid/test/mocha.opts +3 -0
- package/node_modules/uuid/test/test.js +96 -0
- package/node_modules/uuid/v1.js +103 -0
- package/node_modules/uuid/v4.js +29 -0
- package/node_modules/verror/package.json +14 -6
- package/node_modules/wide-align/package.json +19 -11
- package/node_modules/wrappy/package.json +17 -8
- package/node_modules/xtend/package.json +29 -21
- package/package.json +2 -2
- package/node_modules/async/CHANGELOG.md +0 -125
- package/node_modules/async/README.md +0 -1877
- package/node_modules/async/dist/async.js +0 -1265
- package/node_modules/async/dist/async.min.js +0 -2
- package/node_modules/async/lib/async.js +0 -1265
- package/node_modules/async/package.json +0 -149
- package/node_modules/bl/.jshintrc +0 -59
- package/node_modules/bl/.npmignore +0 -1
- package/node_modules/bl/.travis.yml +0 -13
- package/node_modules/bl/LICENSE.md +0 -13
- package/node_modules/bl/README.md +0 -200
- package/node_modules/bl/bl.js +0 -243
- package/node_modules/bl/node_modules/readable-stream/.npmignore +0 -5
- package/node_modules/bl/node_modules/readable-stream/.zuul.yml +0 -1
- package/node_modules/bl/node_modules/readable-stream/doc/stream.markdown +0 -1760
- package/node_modules/bl/package.json +0 -96
- package/node_modules/bl/test/test.js +0 -640
- package/node_modules/form-data/.dockerignore +0 -7
- package/node_modules/form-data/.editorconfig +0 -10
- package/node_modules/form-data/.eslintignore +0 -1
- package/node_modules/form-data/.eslintrc +0 -64
- package/node_modules/form-data/wercker.yml +0 -36
- package/node_modules/gauge/CHANGELOG.md~ +0 -123
- package/node_modules/gauge/README.md~ +0 -393
- package/node_modules/has-color/index.js +0 -32
- package/node_modules/has-color/package.json +0 -97
- package/node_modules/has-color/readme.md +0 -30
- package/node_modules/inherits/test.js +0 -25
- package/node_modules/jsonpointer/.travis.yml +0 -10
- package/node_modules/jsonpointer/test.js +0 -98
- package/node_modules/node-uuid/.npmignore +0 -4
- package/node_modules/node-uuid/README.md +0 -254
- package/node_modules/node-uuid/benchmark/README.md +0 -53
- package/node_modules/node-uuid/benchmark/bench.gnu +0 -174
- package/node_modules/node-uuid/benchmark/bench.sh +0 -34
- package/node_modules/node-uuid/benchmark/benchmark-native.c +0 -34
- package/node_modules/node-uuid/benchmark/benchmark.js +0 -84
- package/node_modules/node-uuid/bower.json +0 -23
- package/node_modules/node-uuid/component.json +0 -25
- package/node_modules/node-uuid/package.json +0 -105
- package/node_modules/node-uuid/test/compare_v1.js +0 -63
- package/node_modules/node-uuid/test/test.html +0 -17
- package/node_modules/node-uuid/test/test.js +0 -231
- package/node_modules/node-uuid/uuid.js +0 -272
- package/node_modules/npmlog/CHANGELOG.md~ +0 -31
- package/node_modules/qs/.jscs.json +0 -176
- package/node_modules/qs/CONTRIBUTING.md +0 -1
- package/node_modules/readable-stream/doc/stream.md +0 -1772
- package/node_modules/request/.eslintrc +0 -45
- package/node_modules/request/.npmignore +0 -6
- package/node_modules/request/.travis.yml +0 -21
- package/node_modules/request/CONTRIBUTING.md +0 -81
- package/node_modules/request/codecov.yml +0 -2
- package/node_modules/strip-json-comments/cli.js +0 -41
- package/node_modules/strip-json-comments/strip-json-comments.js +0 -73
@@ -2,18 +2,18 @@
|
|
2
2
|
|
3
3
|
function posix(path) {
|
4
4
|
return path.charAt(0) === '/';
|
5
|
-
}
|
5
|
+
}
|
6
6
|
|
7
7
|
function win32(path) {
|
8
|
-
// https://github.com/
|
8
|
+
// https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56
|
9
9
|
var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
|
10
10
|
var result = splitDeviceRe.exec(path);
|
11
11
|
var device = result[1] || '';
|
12
|
-
var isUnc =
|
12
|
+
var isUnc = Boolean(device && device.charAt(1) !== ':');
|
13
13
|
|
14
14
|
// UNC paths are always absolute
|
15
|
-
return
|
16
|
-
}
|
15
|
+
return Boolean(result[2] || isUnc);
|
16
|
+
}
|
17
17
|
|
18
18
|
module.exports = process.platform === 'win32' ? win32 : posix;
|
19
19
|
module.exports.posix = posix;
|
@@ -1,41 +1,53 @@
|
|
1
1
|
{
|
2
2
|
"_args": [
|
3
3
|
[
|
4
|
-
|
4
|
+
{
|
5
|
+
"raw": "path-is-absolute@^1.0.0",
|
6
|
+
"scope": null,
|
7
|
+
"escapedName": "path-is-absolute",
|
8
|
+
"name": "path-is-absolute",
|
9
|
+
"rawSpec": "^1.0.0",
|
10
|
+
"spec": ">=1.0.0 <2.0.0",
|
11
|
+
"type": "range"
|
12
|
+
},
|
5
13
|
"/Users/eshanker/Code/fsevents/node_modules/glob"
|
6
14
|
]
|
7
15
|
],
|
8
16
|
"_from": "path-is-absolute@>=1.0.0 <2.0.0",
|
9
|
-
"_id": "path-is-absolute@1.0.
|
17
|
+
"_id": "path-is-absolute@1.0.1",
|
10
18
|
"_inCache": true,
|
11
|
-
"_installable": true,
|
12
19
|
"_location": "/path-is-absolute",
|
13
|
-
"_nodeVersion": "
|
20
|
+
"_nodeVersion": "6.6.0",
|
21
|
+
"_npmOperationalInternal": {
|
22
|
+
"host": "packages-12-west.internal.npmjs.com",
|
23
|
+
"tmp": "tmp/path-is-absolute-1.0.1.tgz_1475210523565_0.9876507974695414"
|
24
|
+
},
|
14
25
|
"_npmUser": {
|
15
|
-
"
|
16
|
-
"
|
26
|
+
"name": "sindresorhus",
|
27
|
+
"email": "sindresorhus@gmail.com"
|
17
28
|
},
|
18
|
-
"_npmVersion": "
|
29
|
+
"_npmVersion": "3.10.3",
|
19
30
|
"_phantomChildren": {},
|
20
31
|
"_requested": {
|
21
|
-
"name": "path-is-absolute",
|
22
32
|
"raw": "path-is-absolute@^1.0.0",
|
23
|
-
"rawSpec": "^1.0.0",
|
24
33
|
"scope": null,
|
34
|
+
"escapedName": "path-is-absolute",
|
35
|
+
"name": "path-is-absolute",
|
36
|
+
"rawSpec": "^1.0.0",
|
25
37
|
"spec": ">=1.0.0 <2.0.0",
|
26
38
|
"type": "range"
|
27
39
|
},
|
28
40
|
"_requiredBy": [
|
29
41
|
"/glob"
|
30
42
|
],
|
31
|
-
"_resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.
|
32
|
-
"_shasum": "
|
43
|
+
"_resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
44
|
+
"_shasum": "174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f",
|
33
45
|
"_shrinkwrap": null,
|
34
46
|
"_spec": "path-is-absolute@^1.0.0",
|
35
47
|
"_where": "/Users/eshanker/Code/fsevents/node_modules/glob",
|
36
48
|
"author": {
|
37
|
-
"email": "sindresorhus@gmail.com",
|
38
49
|
"name": "Sindre Sorhus",
|
50
|
+
"email": "sindresorhus@gmail.com",
|
39
51
|
"url": "sindresorhus.com"
|
40
52
|
},
|
41
53
|
"bugs": {
|
@@ -43,11 +55,13 @@
|
|
43
55
|
},
|
44
56
|
"dependencies": {},
|
45
57
|
"description": "Node.js 0.12 path.isAbsolute() ponyfill",
|
46
|
-
"devDependencies": {
|
58
|
+
"devDependencies": {
|
59
|
+
"xo": "^0.16.0"
|
60
|
+
},
|
47
61
|
"directories": {},
|
48
62
|
"dist": {
|
49
|
-
"shasum": "
|
50
|
-
"tarball": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.
|
63
|
+
"shasum": "174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f",
|
64
|
+
"tarball": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz"
|
51
65
|
},
|
52
66
|
"engines": {
|
53
67
|
"node": ">=0.10.0"
|
@@ -55,26 +69,26 @@
|
|
55
69
|
"files": [
|
56
70
|
"index.js"
|
57
71
|
],
|
58
|
-
"gitHead": "
|
59
|
-
"homepage": "https://github.com/sindresorhus/path-is-absolute",
|
72
|
+
"gitHead": "edc91d348b21dac2ab65ea2fbec2868e2eff5eb6",
|
73
|
+
"homepage": "https://github.com/sindresorhus/path-is-absolute#readme",
|
60
74
|
"keywords": [
|
75
|
+
"path",
|
76
|
+
"paths",
|
77
|
+
"file",
|
78
|
+
"dir",
|
61
79
|
"absolute",
|
80
|
+
"isabsolute",
|
81
|
+
"is-absolute",
|
62
82
|
"built-in",
|
63
|
-
"
|
83
|
+
"util",
|
84
|
+
"utils",
|
64
85
|
"core",
|
65
|
-
"detect",
|
66
|
-
"dir",
|
67
|
-
"file",
|
68
|
-
"is",
|
69
|
-
"is-absolute",
|
70
|
-
"isabsolute",
|
71
|
-
"path",
|
72
|
-
"paths",
|
73
|
-
"polyfill",
|
74
86
|
"ponyfill",
|
87
|
+
"polyfill",
|
75
88
|
"shim",
|
76
|
-
"
|
77
|
-
"
|
89
|
+
"is",
|
90
|
+
"detect",
|
91
|
+
"check"
|
78
92
|
],
|
79
93
|
"license": "MIT",
|
80
94
|
"maintainers": [
|
@@ -91,7 +105,7 @@
|
|
91
105
|
"url": "git+https://github.com/sindresorhus/path-is-absolute.git"
|
92
106
|
},
|
93
107
|
"scripts": {
|
94
|
-
"test": "node test.js"
|
108
|
+
"test": "xo && node test.js"
|
95
109
|
},
|
96
|
-
"version": "1.0.
|
110
|
+
"version": "1.0.1"
|
97
111
|
}
|
@@ -1,8 +1,6 @@
|
|
1
1
|
# path-is-absolute [](https://travis-ci.org/sindresorhus/path-is-absolute)
|
2
2
|
|
3
|
-
> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) ponyfill
|
4
|
-
|
5
|
-
> Ponyfill: A polyfill that doesn't overwrite the native method
|
3
|
+
> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) [ponyfill](https://ponyfill.com)
|
6
4
|
|
7
5
|
|
8
6
|
## Install
|
@@ -15,19 +13,29 @@ $ npm install --save path-is-absolute
|
|
15
13
|
## Usage
|
16
14
|
|
17
15
|
```js
|
18
|
-
|
16
|
+
const pathIsAbsolute = require('path-is-absolute');
|
19
17
|
|
20
|
-
// Linux
|
18
|
+
// Running on Linux
|
21
19
|
pathIsAbsolute('/home/foo');
|
22
20
|
//=> true
|
21
|
+
pathIsAbsolute('C:/Users/foo');
|
22
|
+
//=> false
|
23
23
|
|
24
|
-
// Windows
|
25
|
-
pathIsAbsolute('C:/Users/');
|
24
|
+
// Running on Windows
|
25
|
+
pathIsAbsolute('C:/Users/foo');
|
26
26
|
//=> true
|
27
|
+
pathIsAbsolute('/home/foo');
|
28
|
+
//=> false
|
27
29
|
|
28
|
-
//
|
30
|
+
// Running on any OS
|
29
31
|
pathIsAbsolute.posix('/home/foo');
|
30
32
|
//=> true
|
33
|
+
pathIsAbsolute.posix('C:/Users/foo');
|
34
|
+
//=> false
|
35
|
+
pathIsAbsolute.win32('C:/Users/foo');
|
36
|
+
//=> true
|
37
|
+
pathIsAbsolute.win32('/home/foo');
|
38
|
+
//=> false
|
31
39
|
```
|
32
40
|
|
33
41
|
|
@@ -39,13 +47,13 @@ See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isa
|
|
39
47
|
|
40
48
|
### pathIsAbsolute.posix(path)
|
41
49
|
|
42
|
-
|
50
|
+
POSIX specific version.
|
43
51
|
|
44
52
|
### pathIsAbsolute.win32(path)
|
45
53
|
|
46
|
-
|
54
|
+
Windows specific version.
|
47
55
|
|
48
56
|
|
49
57
|
## License
|
50
58
|
|
51
|
-
MIT © [Sindre Sorhus](
|
59
|
+
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
@@ -1,27 +1,35 @@
|
|
1
1
|
{
|
2
2
|
"_args": [
|
3
3
|
[
|
4
|
-
|
4
|
+
{
|
5
|
+
"raw": "pinkie@^2.0.0",
|
6
|
+
"scope": null,
|
7
|
+
"escapedName": "pinkie",
|
8
|
+
"name": "pinkie",
|
9
|
+
"rawSpec": "^2.0.0",
|
10
|
+
"spec": ">=2.0.0 <3.0.0",
|
11
|
+
"type": "range"
|
12
|
+
},
|
5
13
|
"/Users/eshanker/Code/fsevents/node_modules/pinkie-promise"
|
6
14
|
]
|
7
15
|
],
|
8
16
|
"_from": "pinkie@>=2.0.0 <3.0.0",
|
9
17
|
"_id": "pinkie@2.0.4",
|
10
18
|
"_inCache": true,
|
11
|
-
"_installable": true,
|
12
19
|
"_location": "/pinkie",
|
13
20
|
"_nodeVersion": "4.2.4",
|
14
21
|
"_npmUser": {
|
15
|
-
"
|
16
|
-
"
|
22
|
+
"name": "floatdrop",
|
23
|
+
"email": "floatdrop@gmail.com"
|
17
24
|
},
|
18
25
|
"_npmVersion": "2.14.12",
|
19
26
|
"_phantomChildren": {},
|
20
27
|
"_requested": {
|
21
|
-
"name": "pinkie",
|
22
28
|
"raw": "pinkie@^2.0.0",
|
23
|
-
"rawSpec": "^2.0.0",
|
24
29
|
"scope": null,
|
30
|
+
"escapedName": "pinkie",
|
31
|
+
"name": "pinkie",
|
32
|
+
"rawSpec": "^2.0.0",
|
25
33
|
"spec": ">=2.0.0 <3.0.0",
|
26
34
|
"type": "range"
|
27
35
|
},
|
@@ -34,8 +42,8 @@
|
|
34
42
|
"_spec": "pinkie@^2.0.0",
|
35
43
|
"_where": "/Users/eshanker/Code/fsevents/node_modules/pinkie-promise",
|
36
44
|
"author": {
|
37
|
-
"email": "floatdrop@gmail.com",
|
38
45
|
"name": "Vsevolod Strukchinsky",
|
46
|
+
"email": "floatdrop@gmail.com",
|
39
47
|
"url": "github.com/floatdrop"
|
40
48
|
},
|
41
49
|
"bugs": {
|
@@ -65,10 +73,10 @@
|
|
65
73
|
"gitHead": "8d4a92447a5c62bff9f89756caeb4c9c8770579b",
|
66
74
|
"homepage": "https://github.com/floatdrop/pinkie",
|
67
75
|
"keywords": [
|
68
|
-
"es2015",
|
69
|
-
"es6",
|
70
76
|
"promise",
|
71
|
-
"promises"
|
77
|
+
"promises",
|
78
|
+
"es2015",
|
79
|
+
"es6"
|
72
80
|
],
|
73
81
|
"license": "MIT",
|
74
82
|
"maintainers": [
|
@@ -1,14 +1,21 @@
|
|
1
1
|
{
|
2
2
|
"_args": [
|
3
3
|
[
|
4
|
-
|
4
|
+
{
|
5
|
+
"raw": "pinkie-promise@^2.0.0",
|
6
|
+
"scope": null,
|
7
|
+
"escapedName": "pinkie-promise",
|
8
|
+
"name": "pinkie-promise",
|
9
|
+
"rawSpec": "^2.0.0",
|
10
|
+
"spec": ">=2.0.0 <3.0.0",
|
11
|
+
"type": "range"
|
12
|
+
},
|
5
13
|
"/Users/eshanker/Code/fsevents/node_modules/har-validator"
|
6
14
|
]
|
7
15
|
],
|
8
16
|
"_from": "pinkie-promise@>=2.0.0 <3.0.0",
|
9
17
|
"_id": "pinkie-promise@2.0.1",
|
10
18
|
"_inCache": true,
|
11
|
-
"_installable": true,
|
12
19
|
"_location": "/pinkie-promise",
|
13
20
|
"_nodeVersion": "4.4.1",
|
14
21
|
"_npmOperationalInternal": {
|
@@ -16,16 +23,17 @@
|
|
16
23
|
"tmp": "tmp/pinkie-promise-2.0.1.tgz_1460309839126_0.3422858319245279"
|
17
24
|
},
|
18
25
|
"_npmUser": {
|
19
|
-
"
|
20
|
-
"
|
26
|
+
"name": "floatdrop",
|
27
|
+
"email": "floatdrop@gmail.com"
|
21
28
|
},
|
22
29
|
"_npmVersion": "2.14.20",
|
23
30
|
"_phantomChildren": {},
|
24
31
|
"_requested": {
|
25
|
-
"name": "pinkie-promise",
|
26
32
|
"raw": "pinkie-promise@^2.0.0",
|
27
|
-
"rawSpec": "^2.0.0",
|
28
33
|
"scope": null,
|
34
|
+
"escapedName": "pinkie-promise",
|
35
|
+
"name": "pinkie-promise",
|
36
|
+
"rawSpec": "^2.0.0",
|
29
37
|
"spec": ">=2.0.0 <3.0.0",
|
30
38
|
"type": "range"
|
31
39
|
},
|
@@ -38,8 +46,8 @@
|
|
38
46
|
"_spec": "pinkie-promise@^2.0.0",
|
39
47
|
"_where": "/Users/eshanker/Code/fsevents/node_modules/har-validator",
|
40
48
|
"author": {
|
41
|
-
"email": "floatdrop@gmail.com",
|
42
49
|
"name": "Vsevolod Strukchinsky",
|
50
|
+
"email": "floatdrop@gmail.com",
|
43
51
|
"url": "github.com/floatdrop"
|
44
52
|
},
|
45
53
|
"bugs": {
|
@@ -66,12 +74,12 @@
|
|
66
74
|
"gitHead": "4a936c09c34ad591a25db93f1216d242de0d6184",
|
67
75
|
"homepage": "https://github.com/floatdrop/pinkie-promise",
|
68
76
|
"keywords": [
|
77
|
+
"promise",
|
78
|
+
"promises",
|
69
79
|
"es2015",
|
70
80
|
"es6",
|
71
81
|
"polyfill",
|
72
|
-
"ponyfill"
|
73
|
-
"promise",
|
74
|
-
"promises"
|
82
|
+
"ponyfill"
|
75
83
|
],
|
76
84
|
"license": "MIT",
|
77
85
|
"maintainers": [
|
@@ -1,14 +1,21 @@
|
|
1
1
|
{
|
2
2
|
"_args": [
|
3
3
|
[
|
4
|
-
|
4
|
+
{
|
5
|
+
"raw": "process-nextick-args@~1.0.6",
|
6
|
+
"scope": null,
|
7
|
+
"escapedName": "process-nextick-args",
|
8
|
+
"name": "process-nextick-args",
|
9
|
+
"rawSpec": "~1.0.6",
|
10
|
+
"spec": ">=1.0.6 <1.1.0",
|
11
|
+
"type": "range"
|
12
|
+
},
|
5
13
|
"/Users/eshanker/Code/fsevents/node_modules/readable-stream"
|
6
14
|
]
|
7
15
|
],
|
8
16
|
"_from": "process-nextick-args@>=1.0.6 <1.1.0",
|
9
17
|
"_id": "process-nextick-args@1.0.7",
|
10
18
|
"_inCache": true,
|
11
|
-
"_installable": true,
|
12
19
|
"_location": "/process-nextick-args",
|
13
20
|
"_nodeVersion": "5.11.0",
|
14
21
|
"_npmOperationalInternal": {
|
@@ -16,22 +23,23 @@
|
|
16
23
|
"tmp": "tmp/process-nextick-args-1.0.7.tgz_1462394251778_0.36989671061746776"
|
17
24
|
},
|
18
25
|
"_npmUser": {
|
19
|
-
"
|
20
|
-
"
|
26
|
+
"name": "cwmma",
|
27
|
+
"email": "calvin.metcalf@gmail.com"
|
21
28
|
},
|
22
29
|
"_npmVersion": "3.8.6",
|
23
30
|
"_phantomChildren": {},
|
24
31
|
"_requested": {
|
25
|
-
"name": "process-nextick-args",
|
26
32
|
"raw": "process-nextick-args@~1.0.6",
|
27
|
-
"rawSpec": "~1.0.6",
|
28
33
|
"scope": null,
|
34
|
+
"escapedName": "process-nextick-args",
|
35
|
+
"name": "process-nextick-args",
|
36
|
+
"rawSpec": "~1.0.6",
|
29
37
|
"spec": ">=1.0.6 <1.1.0",
|
30
38
|
"type": "range"
|
31
39
|
},
|
32
40
|
"_requiredBy": [
|
33
|
-
"/
|
34
|
-
"/readable-stream"
|
41
|
+
"/readable-stream",
|
42
|
+
"/tar-pack/readable-stream"
|
35
43
|
],
|
36
44
|
"_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
|
37
45
|
"_shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3",
|
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright Mathias Bynens <https://mathiasbynens.be/>
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a 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
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,176 @@
|
|
1
|
+
# Punycode.js [](https://travis-ci.org/bestiejs/punycode.js) [](https://coveralls.io/r/bestiejs/punycode.js) [](https://gemnasium.com/bestiejs/punycode.js)
|
2
|
+
|
3
|
+
A robust Punycode converter that fully complies to [RFC 3492](https://tools.ietf.org/html/rfc3492) and [RFC 5891](https://tools.ietf.org/html/rfc5891), and works on nearly all JavaScript platforms.
|
4
|
+
|
5
|
+
This JavaScript library is the result of comparing, optimizing and documenting different open-source implementations of the Punycode algorithm:
|
6
|
+
|
7
|
+
* [The C example code from RFC 3492](https://tools.ietf.org/html/rfc3492#appendix-C)
|
8
|
+
* [`punycode.c` by _Markus W. Scherer_ (IBM)](http://opensource.apple.com/source/ICU/ICU-400.42/icuSources/common/punycode.c)
|
9
|
+
* [`punycode.c` by _Ben Noordhuis_](https://github.com/bnoordhuis/punycode/blob/master/punycode.c)
|
10
|
+
* [JavaScript implementation by _some_](http://stackoverflow.com/questions/183485/can-anyone-recommend-a-good-free-javascript-for-punycode-to-unicode-conversion/301287#301287)
|
11
|
+
* [`punycode.js` by _Ben Noordhuis_](https://github.com/joyent/node/blob/426298c8c1c0d5b5224ac3658c41e7c2a3fe9377/lib/punycode.js) (note: [not fully compliant](https://github.com/joyent/node/issues/2072))
|
12
|
+
|
13
|
+
This project is [bundled](https://github.com/joyent/node/blob/master/lib/punycode.js) with [Node.js v0.6.2+](https://github.com/joyent/node/compare/975f1930b1...61e796decc) and [io.js v1.0.0+](https://github.com/iojs/io.js/blob/v1.x/lib/punycode.js).
|
14
|
+
|
15
|
+
## Installation
|
16
|
+
|
17
|
+
Via [npm](https://www.npmjs.com/) (only required for Node.js releases older than v0.6.2):
|
18
|
+
|
19
|
+
```bash
|
20
|
+
npm install punycode
|
21
|
+
```
|
22
|
+
|
23
|
+
Via [Bower](http://bower.io/):
|
24
|
+
|
25
|
+
```bash
|
26
|
+
bower install punycode
|
27
|
+
```
|
28
|
+
|
29
|
+
Via [Component](https://github.com/component/component):
|
30
|
+
|
31
|
+
```bash
|
32
|
+
component install bestiejs/punycode.js
|
33
|
+
```
|
34
|
+
|
35
|
+
In a browser:
|
36
|
+
|
37
|
+
```html
|
38
|
+
<script src="punycode.js"></script>
|
39
|
+
```
|
40
|
+
|
41
|
+
In [Node.js](https://nodejs.org/), [io.js](https://iojs.org/), [Narwhal](http://narwhaljs.org/), and [RingoJS](http://ringojs.org/):
|
42
|
+
|
43
|
+
```js
|
44
|
+
var punycode = require('punycode');
|
45
|
+
```
|
46
|
+
|
47
|
+
In [Rhino](http://www.mozilla.org/rhino/):
|
48
|
+
|
49
|
+
```js
|
50
|
+
load('punycode.js');
|
51
|
+
```
|
52
|
+
|
53
|
+
Using an AMD loader like [RequireJS](http://requirejs.org/):
|
54
|
+
|
55
|
+
```js
|
56
|
+
require(
|
57
|
+
{
|
58
|
+
'paths': {
|
59
|
+
'punycode': 'path/to/punycode'
|
60
|
+
}
|
61
|
+
},
|
62
|
+
['punycode'],
|
63
|
+
function(punycode) {
|
64
|
+
console.log(punycode);
|
65
|
+
}
|
66
|
+
);
|
67
|
+
```
|
68
|
+
|
69
|
+
## API
|
70
|
+
|
71
|
+
### `punycode.decode(string)`
|
72
|
+
|
73
|
+
Converts a Punycode string of ASCII symbols to a string of Unicode symbols.
|
74
|
+
|
75
|
+
```js
|
76
|
+
// decode domain name parts
|
77
|
+
punycode.decode('maana-pta'); // 'mañana'
|
78
|
+
punycode.decode('--dqo34k'); // '☃-⌘'
|
79
|
+
```
|
80
|
+
|
81
|
+
### `punycode.encode(string)`
|
82
|
+
|
83
|
+
Converts a string of Unicode symbols to a Punycode string of ASCII symbols.
|
84
|
+
|
85
|
+
```js
|
86
|
+
// encode domain name parts
|
87
|
+
punycode.encode('mañana'); // 'maana-pta'
|
88
|
+
punycode.encode('☃-⌘'); // '--dqo34k'
|
89
|
+
```
|
90
|
+
|
91
|
+
### `punycode.toUnicode(input)`
|
92
|
+
|
93
|
+
Converts a Punycode string representing a domain name or an email address to Unicode. Only the Punycoded parts of the input will be converted, i.e. it doesn’t matter if you call it on a string that has already been converted to Unicode.
|
94
|
+
|
95
|
+
```js
|
96
|
+
// decode domain names
|
97
|
+
punycode.toUnicode('xn--maana-pta.com');
|
98
|
+
// → 'mañana.com'
|
99
|
+
punycode.toUnicode('xn----dqo34k.com');
|
100
|
+
// → '☃-⌘.com'
|
101
|
+
|
102
|
+
// decode email addresses
|
103
|
+
punycode.toUnicode('джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq');
|
104
|
+
// → 'джумла@джpумлатест.bрфa'
|
105
|
+
```
|
106
|
+
|
107
|
+
### `punycode.toASCII(input)`
|
108
|
+
|
109
|
+
Converts a lowercased Unicode string representing a domain name or an email address to Punycode. Only the non-ASCII parts of the input will be converted, i.e. it doesn’t matter if you call it with a domain that’s already in ASCII.
|
110
|
+
|
111
|
+
```js
|
112
|
+
// encode domain names
|
113
|
+
punycode.toASCII('mañana.com');
|
114
|
+
// → 'xn--maana-pta.com'
|
115
|
+
punycode.toASCII('☃-⌘.com');
|
116
|
+
// → 'xn----dqo34k.com'
|
117
|
+
|
118
|
+
// encode email addresses
|
119
|
+
punycode.toASCII('джумла@джpумлатест.bрфa');
|
120
|
+
// → 'джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq'
|
121
|
+
```
|
122
|
+
|
123
|
+
### `punycode.ucs2`
|
124
|
+
|
125
|
+
#### `punycode.ucs2.decode(string)`
|
126
|
+
|
127
|
+
Creates an array containing the numeric code point values of each Unicode symbol in the string. While [JavaScript uses UCS-2 internally](https://mathiasbynens.be/notes/javascript-encoding), this function will convert a pair of surrogate halves (each of which UCS-2 exposes as separate characters) into a single code point, matching UTF-16.
|
128
|
+
|
129
|
+
```js
|
130
|
+
punycode.ucs2.decode('abc');
|
131
|
+
// → [0x61, 0x62, 0x63]
|
132
|
+
// surrogate pair for U+1D306 TETRAGRAM FOR CENTRE:
|
133
|
+
punycode.ucs2.decode('\uD834\uDF06');
|
134
|
+
// → [0x1D306]
|
135
|
+
```
|
136
|
+
|
137
|
+
#### `punycode.ucs2.encode(codePoints)`
|
138
|
+
|
139
|
+
Creates a string based on an array of numeric code point values.
|
140
|
+
|
141
|
+
```js
|
142
|
+
punycode.ucs2.encode([0x61, 0x62, 0x63]);
|
143
|
+
// → 'abc'
|
144
|
+
punycode.ucs2.encode([0x1D306]);
|
145
|
+
// → '\uD834\uDF06'
|
146
|
+
```
|
147
|
+
|
148
|
+
### `punycode.version`
|
149
|
+
|
150
|
+
A string representing the current Punycode.js version number.
|
151
|
+
|
152
|
+
## Unit tests & code coverage
|
153
|
+
|
154
|
+
After cloning this repository, run `npm install --dev` to install the dependencies needed for Punycode.js development and testing. You may want to install Istanbul _globally_ using `npm install istanbul -g`.
|
155
|
+
|
156
|
+
Once that’s done, you can run the unit tests in Node using `npm test` or `node tests/tests.js`. To run the tests in Rhino, Ringo, Narwhal, PhantomJS, and web browsers as well, use `grunt test`.
|
157
|
+
|
158
|
+
To generate the code coverage report, use `grunt cover`.
|
159
|
+
|
160
|
+
Feel free to fork if you see possible improvements!
|
161
|
+
|
162
|
+
## Author
|
163
|
+
|
164
|
+
| [](https://twitter.com/mathias "Follow @mathias on Twitter") |
|
165
|
+
|---|
|
166
|
+
| [Mathias Bynens](https://mathiasbynens.be/) |
|
167
|
+
|
168
|
+
## Contributors
|
169
|
+
|
170
|
+
| [](https://twitter.com/jdalton "Follow @jdalton on Twitter") |
|
171
|
+
|---|
|
172
|
+
| [John-David Dalton](http://allyoucanleet.com/) |
|
173
|
+
|
174
|
+
## License
|
175
|
+
|
176
|
+
Punycode.js is available under the [MIT](https://mths.be/mit) license.
|