fsevents 1.2.7 → 1.2.8
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/.travis.yml +0 -2
- package/node_modules/abbrev/package.json +2 -3
- package/node_modules/ansi-regex/package.json +1 -1
- package/node_modules/aproba/package.json +1 -1
- package/node_modules/are-we-there-yet/package.json +1 -1
- package/node_modules/balanced-match/package.json +1 -1
- package/node_modules/brace-expansion/package.json +1 -1
- package/node_modules/chownr/package.json +1 -1
- package/node_modules/code-point-at/package.json +1 -1
- package/node_modules/concat-map/package.json +1 -1
- package/node_modules/console-control-strings/package.json +1 -1
- package/node_modules/core-util-is/package.json +1 -1
- package/node_modules/debug/CHANGELOG.md +34 -1
- package/node_modules/debug/README.md +206 -63
- package/node_modules/debug/dist/debug.js +912 -0
- package/node_modules/debug/package.json +40 -26
- package/node_modules/debug/src/browser.js +185 -106
- package/node_modules/debug/src/common.js +266 -0
- package/node_modules/debug/src/index.js +4 -4
- package/node_modules/debug/src/node.js +174 -165
- package/node_modules/deep-extend/package.json +1 -1
- package/node_modules/delegates/package.json +1 -1
- package/node_modules/detect-libc/package.json +1 -1
- package/node_modules/fs-minipass/package.json +1 -1
- package/node_modules/fs.realpath/package.json +1 -1
- package/node_modules/gauge/package.json +1 -1
- package/node_modules/glob/package.json +1 -1
- package/node_modules/has-unicode/package.json +1 -1
- package/node_modules/iconv-lite/package.json +1 -1
- package/node_modules/ignore-walk/package.json +1 -1
- package/node_modules/inflight/package.json +1 -1
- package/node_modules/inherits/package.json +2 -4
- package/node_modules/ini/package.json +1 -1
- package/node_modules/is-fullwidth-code-point/package.json +1 -1
- package/node_modules/isarray/package.json +1 -1
- package/node_modules/minimatch/package.json +1 -1
- package/node_modules/minimist/package.json +1 -1
- package/node_modules/minipass/package.json +1 -1
- package/node_modules/minizlib/package.json +1 -1
- package/node_modules/mkdirp/package.json +1 -2
- package/node_modules/ms/index.js +28 -18
- package/node_modules/ms/package.json +17 -17
- package/node_modules/ms/readme.md +17 -8
- package/node_modules/needle/.npmignore +6 -0
- package/node_modules/needle/README.md +1 -2
- package/node_modules/needle/examples/multipart-stream.js +1 -1
- package/node_modules/needle/lib/auth.js +1 -1
- package/node_modules/needle/lib/multipart.js +1 -1
- package/node_modules/needle/lib/needle.js +2 -2
- package/node_modules/needle/package-lock.json +395 -0
- package/node_modules/needle/package.json +13 -13
- package/node_modules/needle/test/basic_auth_spec.js +1 -1
- package/node_modules/needle/test/cookies_spec.js +2 -2
- package/node_modules/needle/test/keys/ssl.cert +21 -0
- package/node_modules/needle/test/keys/ssl.key +27 -0
- package/node_modules/needle/test/output_spec.js +1 -1
- package/node_modules/needle/test/post_data_spec.js +20 -20
- package/node_modules/needle/test/proxy_spec.js +1 -1
- package/node_modules/needle/test/utils/test.js +1 -1
- package/node_modules/node-pre-gyp/CHANGELOG.md +10 -0
- package/node_modules/node-pre-gyp/README.md +41 -6
- package/node_modules/node-pre-gyp/lib/build.js +1 -1
- package/node_modules/node-pre-gyp/lib/install.js +20 -8
- package/node_modules/node-pre-gyp/lib/node-pre-gyp.js +1 -1
- package/node_modules/node-pre-gyp/lib/pre-binding.js +5 -5
- package/node_modules/node-pre-gyp/lib/rebuild.js +1 -1
- package/node_modules/node-pre-gyp/lib/reinstall.js +1 -1
- package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +48 -0
- package/node_modules/node-pre-gyp/lib/util/handle_gyp_opts.js +5 -2
- package/node_modules/node-pre-gyp/lib/util/napi.js +70 -22
- package/node_modules/node-pre-gyp/lib/util/versioning.js +7 -6
- package/node_modules/node-pre-gyp/package.json +13 -12
- package/node_modules/nopt/package.json +1 -1
- package/node_modules/npm-bundled/index.js +13 -1
- package/node_modules/npm-bundled/package.json +6 -6
- package/node_modules/npm-packlist/index.js +29 -8
- package/node_modules/npm-packlist/package.json +6 -6
- package/node_modules/npmlog/package.json +1 -1
- package/node_modules/number-is-nan/package.json +1 -1
- package/node_modules/object-assign/package.json +1 -1
- package/node_modules/once/package.json +1 -1
- package/node_modules/os-homedir/package.json +1 -1
- package/node_modules/os-tmpdir/package.json +1 -1
- package/node_modules/osenv/package.json +1 -1
- package/node_modules/path-is-absolute/package.json +1 -1
- package/node_modules/process-nextick-args/package.json +1 -1
- package/node_modules/rc/node_modules/minimist/package.json +1 -1
- package/node_modules/rc/package.json +1 -1
- package/node_modules/readable-stream/package.json +1 -1
- package/node_modules/rimraf/package.json +1 -1
- package/node_modules/safe-buffer/package.json +1 -1
- package/node_modules/safer-buffer/package.json +1 -1
- package/node_modules/sax/package.json +1 -1
- package/node_modules/semver/CHANGELOG.md +39 -0
- package/node_modules/semver/README.md +14 -2
- package/node_modules/semver/bin/semver +84 -77
- package/node_modules/semver/package.json +14 -8
- package/node_modules/semver/semver.js +906 -775
- package/node_modules/set-blocking/package.json +1 -1
- package/node_modules/signal-exit/package.json +1 -1
- package/node_modules/string-width/package.json +1 -1
- package/node_modules/string_decoder/package.json +1 -1
- package/node_modules/strip-ansi/package.json +1 -1
- package/node_modules/strip-json-comments/package.json +1 -1
- package/node_modules/tar/package.json +1 -1
- package/node_modules/util-deprecate/package.json +1 -1
- package/node_modules/wide-align/package.json +1 -1
- package/node_modules/wrappy/package.json +1 -1
- package/node_modules/yallist/package.json +1 -1
- package/package.json +5 -8
- package/node_modules/debug/.coveralls.yml +0 -1
- package/node_modules/debug/.eslintrc +0 -11
- package/node_modules/debug/.npmignore +0 -9
- package/node_modules/debug/.travis.yml +0 -14
- package/node_modules/debug/Makefile +0 -50
- package/node_modules/debug/component.json +0 -19
- package/node_modules/debug/karma.conf.js +0 -70
- package/node_modules/debug/node.js +0 -1
- package/node_modules/debug/src/debug.js +0 -202
- package/node_modules/debug/src/inspector-log.js +0 -15
- package/node_modules/needle/note.xml +0 -7
- package/node_modules/needle/note.xml.1 +0 -7
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
|
22
22
|
"_shasum": "fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b",
|
23
23
|
"_spec": "detect-libc@^1.0.2",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/node-pre-gyp",
|
25
25
|
"author": {
|
26
26
|
"name": "Lovell Fuller",
|
27
27
|
"email": "npm@lovell.info"
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz",
|
22
22
|
"_shasum": "06c277218454ec288df77ada54a03b8702aacb9d",
|
23
23
|
"_spec": "fs-minipass@^1.2.5",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/tar",
|
25
25
|
"author": {
|
26
26
|
"name": "Isaac Z. Schlueter",
|
27
27
|
"email": "i@izs.me",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
22
22
|
"_shasum": "1504ad2523158caa40db4a2787cb01411994ea4f",
|
23
23
|
"_spec": "fs.realpath@^1.0.0",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/glob",
|
25
25
|
"author": {
|
26
26
|
"name": "Isaac Z. Schlueter",
|
27
27
|
"email": "i@izs.me",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
|
22
22
|
"_shasum": "2c03405c7538c39d7eb37b317022e325fb018bf7",
|
23
23
|
"_spec": "gauge@~2.7.3",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/npmlog",
|
25
25
|
"author": {
|
26
26
|
"name": "Rebecca Turner",
|
27
27
|
"email": "me@re-becca.org"
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
|
22
22
|
"_shasum": "3960832d3f1574108342dafd3a67b332c0969df1",
|
23
23
|
"_spec": "glob@^7.1.3",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/rimraf",
|
25
25
|
"author": {
|
26
26
|
"name": "Isaac Z. Schlueter",
|
27
27
|
"email": "i@izs.me",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
|
22
22
|
"_shasum": "e0e6fe6a28cf51138855e086d1691e771de2a8b9",
|
23
23
|
"_spec": "has-unicode@^2.0.0",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/gauge",
|
25
25
|
"author": {
|
26
26
|
"name": "Rebecca Turner",
|
27
27
|
"email": "me@re-becca.org"
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
22
22
|
"_shasum": "2022b4b25fbddc21d2f524974a474aafe733908b",
|
23
23
|
"_spec": "iconv-lite@^0.4.4",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/needle",
|
25
25
|
"author": {
|
26
26
|
"name": "Alexander Shtuchkin",
|
27
27
|
"email": "ashtuchkin@gmail.com"
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz",
|
22
22
|
"_shasum": "a83e62e7d272ac0e3b551aaa82831a19b69f82f8",
|
23
23
|
"_spec": "ignore-walk@^3.0.1",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/npm-packlist",
|
25
25
|
"author": {
|
26
26
|
"name": "Isaac Z. Schlueter",
|
27
27
|
"email": "i@izs.me",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
22
22
|
"_shasum": "49bd6331d7d02d0c09bc910a1075ba8165b56df9",
|
23
23
|
"_spec": "inflight@^1.0.4",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/glob",
|
25
25
|
"author": {
|
26
26
|
"name": "Isaac Z. Schlueter",
|
27
27
|
"email": "i@izs.me",
|
@@ -17,14 +17,12 @@
|
|
17
17
|
},
|
18
18
|
"_requiredBy": [
|
19
19
|
"/glob",
|
20
|
-
"/readable-stream"
|
21
|
-
"/tap",
|
22
|
-
"/tap/glob"
|
20
|
+
"/readable-stream"
|
23
21
|
],
|
24
22
|
"_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
25
23
|
"_shasum": "633c2c83e3da42a502f52466022480f4208261de",
|
26
24
|
"_spec": "inherits@~2.0.3",
|
27
|
-
"_where": "/Users/
|
25
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/readable-stream",
|
28
26
|
"browser": "./inherits_browser.js",
|
29
27
|
"bugs": {
|
30
28
|
"url": "https://github.com/isaacs/inherits/issues"
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
|
22
22
|
"_shasum": "eee25f56db1c9ec6085e0c22778083f596abf927",
|
23
23
|
"_spec": "ini@~1.3.0",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/rc",
|
25
25
|
"author": {
|
26
26
|
"name": "Isaac Z. Schlueter",
|
27
27
|
"email": "i@izs.me",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
|
22
22
|
"_shasum": "ef9e31386f031a7f0d643af82fde50c457ef00cb",
|
23
23
|
"_spec": "is-fullwidth-code-point@^1.0.0",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/string-width",
|
25
25
|
"author": {
|
26
26
|
"name": "Sindre Sorhus",
|
27
27
|
"email": "sindresorhus@gmail.com",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
22
22
|
"_shasum": "bb935d48582cba168c06834957a54a3e07124f11",
|
23
23
|
"_spec": "isarray@~1.0.0",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/readable-stream",
|
25
25
|
"author": {
|
26
26
|
"name": "Julian Gruber",
|
27
27
|
"email": "mail@juliangruber.com",
|
@@ -22,7 +22,7 @@
|
|
22
22
|
"_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
23
23
|
"_shasum": "5166e286457f03306064be5497e8dbb0c3d32083",
|
24
24
|
"_spec": "minimatch@^3.0.4",
|
25
|
-
"_where": "/Users/
|
25
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/ignore-walk",
|
26
26
|
"author": {
|
27
27
|
"name": "Isaac Z. Schlueter",
|
28
28
|
"email": "i@izs.me",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
22
22
|
"_shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d",
|
23
23
|
"_spec": "minimist@0.0.8",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/mkdirp",
|
25
25
|
"author": {
|
26
26
|
"name": "James Halliday",
|
27
27
|
"email": "mail@substack.net",
|
@@ -23,7 +23,7 @@
|
|
23
23
|
"_resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz",
|
24
24
|
"_shasum": "cacebe492022497f656b0f0f51e2682a9ed2d848",
|
25
25
|
"_spec": "minipass@^2.3.4",
|
26
|
-
"_where": "/Users/
|
26
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/tar",
|
27
27
|
"author": {
|
28
28
|
"name": "Isaac Z. Schlueter",
|
29
29
|
"email": "i@izs.me",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"_resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz",
|
22
22
|
"_shasum": "dd27ea6136243c7c880684e8672bb3a45fd9b614",
|
23
23
|
"_spec": "minizlib@^1.1.1",
|
24
|
-
"_where": "/Users/
|
24
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/tar",
|
25
25
|
"author": {
|
26
26
|
"name": "Isaac Z. Schlueter",
|
27
27
|
"email": "i@izs.me",
|
@@ -17,13 +17,12 @@
|
|
17
17
|
},
|
18
18
|
"_requiredBy": [
|
19
19
|
"/node-pre-gyp",
|
20
|
-
"/tap",
|
21
20
|
"/tar"
|
22
21
|
],
|
23
22
|
"_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
|
24
23
|
"_shasum": "30057438eac6cf7f8c4767f38648d6697d75c903",
|
25
24
|
"_spec": "mkdirp@^0.5.1",
|
26
|
-
"_where": "/Users/
|
25
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/node-pre-gyp",
|
27
26
|
"author": {
|
28
27
|
"name": "James Halliday",
|
29
28
|
"email": "mail@substack.net",
|
package/node_modules/ms/index.js
CHANGED
@@ -6,6 +6,7 @@ var s = 1000;
|
|
6
6
|
var m = s * 60;
|
7
7
|
var h = m * 60;
|
8
8
|
var d = h * 24;
|
9
|
+
var w = d * 7;
|
9
10
|
var y = d * 365.25;
|
10
11
|
|
11
12
|
/**
|
@@ -49,7 +50,7 @@ function parse(str) {
|
|
49
50
|
if (str.length > 100) {
|
50
51
|
return;
|
51
52
|
}
|
52
|
-
var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(
|
53
|
+
var match = /^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
|
53
54
|
str
|
54
55
|
);
|
55
56
|
if (!match) {
|
@@ -64,6 +65,10 @@ function parse(str) {
|
|
64
65
|
case 'yr':
|
65
66
|
case 'y':
|
66
67
|
return n * y;
|
68
|
+
case 'weeks':
|
69
|
+
case 'week':
|
70
|
+
case 'w':
|
71
|
+
return n * w;
|
67
72
|
case 'days':
|
68
73
|
case 'day':
|
69
74
|
case 'd':
|
@@ -106,16 +111,17 @@ function parse(str) {
|
|
106
111
|
*/
|
107
112
|
|
108
113
|
function fmtShort(ms) {
|
109
|
-
|
114
|
+
var msAbs = Math.abs(ms);
|
115
|
+
if (msAbs >= d) {
|
110
116
|
return Math.round(ms / d) + 'd';
|
111
117
|
}
|
112
|
-
if (
|
118
|
+
if (msAbs >= h) {
|
113
119
|
return Math.round(ms / h) + 'h';
|
114
120
|
}
|
115
|
-
if (
|
121
|
+
if (msAbs >= m) {
|
116
122
|
return Math.round(ms / m) + 'm';
|
117
123
|
}
|
118
|
-
if (
|
124
|
+
if (msAbs >= s) {
|
119
125
|
return Math.round(ms / s) + 's';
|
120
126
|
}
|
121
127
|
return ms + 'ms';
|
@@ -130,23 +136,27 @@ function fmtShort(ms) {
|
|
130
136
|
*/
|
131
137
|
|
132
138
|
function fmtLong(ms) {
|
133
|
-
|
134
|
-
|
135
|
-
plural(ms,
|
136
|
-
|
137
|
-
|
139
|
+
var msAbs = Math.abs(ms);
|
140
|
+
if (msAbs >= d) {
|
141
|
+
return plural(ms, msAbs, d, 'day');
|
142
|
+
}
|
143
|
+
if (msAbs >= h) {
|
144
|
+
return plural(ms, msAbs, h, 'hour');
|
145
|
+
}
|
146
|
+
if (msAbs >= m) {
|
147
|
+
return plural(ms, msAbs, m, 'minute');
|
148
|
+
}
|
149
|
+
if (msAbs >= s) {
|
150
|
+
return plural(ms, msAbs, s, 'second');
|
151
|
+
}
|
152
|
+
return ms + ' ms';
|
138
153
|
}
|
139
154
|
|
140
155
|
/**
|
141
156
|
* Pluralization helper.
|
142
157
|
*/
|
143
158
|
|
144
|
-
function plural(ms, n, name) {
|
145
|
-
|
146
|
-
|
147
|
-
}
|
148
|
-
if (ms < n * 1.5) {
|
149
|
-
return Math.floor(ms / n) + ' ' + name;
|
150
|
-
}
|
151
|
-
return Math.ceil(ms / n) + ' ' + name + 's';
|
159
|
+
function plural(ms, msAbs, n, name) {
|
160
|
+
var isPlural = msAbs >= n * 1.5;
|
161
|
+
return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
|
152
162
|
}
|
@@ -1,39 +1,39 @@
|
|
1
1
|
{
|
2
|
-
"_from": "ms
|
3
|
-
"_id": "ms@2.
|
2
|
+
"_from": "ms@^2.1.1",
|
3
|
+
"_id": "ms@2.1.1",
|
4
4
|
"_inBundle": false,
|
5
|
-
"_integrity": "
|
5
|
+
"_integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
|
6
6
|
"_location": "/ms",
|
7
7
|
"_phantomChildren": {},
|
8
8
|
"_requested": {
|
9
|
-
"type": "
|
9
|
+
"type": "range",
|
10
10
|
"registry": true,
|
11
|
-
"raw": "ms
|
11
|
+
"raw": "ms@^2.1.1",
|
12
12
|
"name": "ms",
|
13
13
|
"escapedName": "ms",
|
14
|
-
"rawSpec": "2.
|
14
|
+
"rawSpec": "^2.1.1",
|
15
15
|
"saveSpec": null,
|
16
|
-
"fetchSpec": "2.
|
16
|
+
"fetchSpec": "^2.1.1"
|
17
17
|
},
|
18
18
|
"_requiredBy": [
|
19
19
|
"/debug"
|
20
20
|
],
|
21
|
-
"_resolved": "https://registry.npmjs.org/ms/-/ms-2.
|
22
|
-
"_shasum": "
|
23
|
-
"_spec": "ms
|
24
|
-
"_where": "/Users/
|
21
|
+
"_resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
|
22
|
+
"_shasum": "30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a",
|
23
|
+
"_spec": "ms@^2.1.1",
|
24
|
+
"_where": "/Users/pipobscure/fsevents/node_modules/debug",
|
25
25
|
"bugs": {
|
26
26
|
"url": "https://github.com/zeit/ms/issues"
|
27
27
|
},
|
28
28
|
"bundleDependencies": false,
|
29
29
|
"deprecated": false,
|
30
|
-
"description": "Tiny
|
30
|
+
"description": "Tiny millisecond conversion utility",
|
31
31
|
"devDependencies": {
|
32
|
-
"eslint": "
|
32
|
+
"eslint": "4.12.1",
|
33
33
|
"expect.js": "0.3.1",
|
34
|
-
"husky": "0.
|
35
|
-
"lint-staged": "
|
36
|
-
"mocha": "
|
34
|
+
"husky": "0.14.3",
|
35
|
+
"lint-staged": "5.0.0",
|
36
|
+
"mocha": "4.0.1"
|
37
37
|
},
|
38
38
|
"eslintConfig": {
|
39
39
|
"extends": "eslint:recommended",
|
@@ -65,5 +65,5 @@
|
|
65
65
|
"precommit": "lint-staged",
|
66
66
|
"test": "mocha tests.js"
|
67
67
|
},
|
68
|
-
"version": "2.
|
68
|
+
"version": "2.1.1"
|
69
69
|
}
|
@@ -17,35 +17,44 @@ ms('1m') // 60000
|
|
17
17
|
ms('5s') // 5000
|
18
18
|
ms('1y') // 31557600000
|
19
19
|
ms('100') // 100
|
20
|
+
ms('-3 days') // -259200000
|
21
|
+
ms('-1h') // -3600000
|
22
|
+
ms('-200') // -200
|
20
23
|
```
|
21
24
|
|
22
|
-
### Convert from
|
25
|
+
### Convert from Milliseconds
|
23
26
|
|
24
27
|
```js
|
25
28
|
ms(60000) // "1m"
|
26
29
|
ms(2 * 60000) // "2m"
|
30
|
+
ms(-3 * 60000) // "-3m"
|
27
31
|
ms(ms('10 hours')) // "10h"
|
28
32
|
```
|
29
33
|
|
30
|
-
### Time
|
34
|
+
### Time Format Written-Out
|
31
35
|
|
32
36
|
```js
|
33
37
|
ms(60000, { long: true }) // "1 minute"
|
34
38
|
ms(2 * 60000, { long: true }) // "2 minutes"
|
39
|
+
ms(-3 * 60000, { long: true }) // "-3 minutes"
|
35
40
|
ms(ms('10 hours'), { long: true }) // "10 hours"
|
36
41
|
```
|
37
42
|
|
38
43
|
## Features
|
39
44
|
|
40
|
-
- Works both in [
|
41
|
-
- If a number is supplied to `ms`, a string with a unit is returned
|
42
|
-
- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)
|
43
|
-
- If you pass a string with a number and a valid unit, the number of equivalent
|
45
|
+
- Works both in [Node.js](https://nodejs.org) and in the browser
|
46
|
+
- If a number is supplied to `ms`, a string with a unit is returned
|
47
|
+
- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)
|
48
|
+
- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned
|
44
49
|
|
45
|
-
##
|
50
|
+
## Related Packages
|
51
|
+
|
52
|
+
- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time.
|
53
|
+
|
54
|
+
## Caught a Bug?
|
46
55
|
|
47
56
|
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
|
48
57
|
2. Link the package to the global module directory: `npm link`
|
49
|
-
3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm,
|
58
|
+
3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms!
|
50
59
|
|
51
60
|
As always, you can run the tests using: `npm test`
|
@@ -2,7 +2,7 @@ var needle = require('./../');
|
|
2
2
|
|
3
3
|
var url = 'http://posttestserver.com/post.php?dir=needle';
|
4
4
|
|
5
|
-
var black_pixel =
|
5
|
+
var black_pixel = Buffer.from("R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=", 'base64');
|
6
6
|
|
7
7
|
var data = {
|
8
8
|
foo: 'bar',
|
@@ -21,7 +21,7 @@ function md5(string) {
|
|
21
21
|
|
22
22
|
function basic(user, pass) {
|
23
23
|
var str = typeof pass == 'undefined' ? user : [user, pass].join(':');
|
24
|
-
return 'Basic ' +
|
24
|
+
return 'Basic ' + Buffer.from(str).toString('base64');
|
25
25
|
}
|
26
26
|
|
27
27
|
////////////////////
|
@@ -73,7 +73,7 @@ function generate_part(name, part, boundary, callback) {
|
|
73
73
|
}
|
74
74
|
|
75
75
|
return_part += '\r\n\r\n';
|
76
|
-
return_part +=
|
76
|
+
return_part += Buffer.from(String(part.value), 'utf8').toString('binary');
|
77
77
|
append();
|
78
78
|
|
79
79
|
}
|
@@ -347,7 +347,7 @@ Needle.prototype.start = function() {
|
|
347
347
|
: json ? JSON.stringify(data) : stringify(data);
|
348
348
|
|
349
349
|
// ensure we have a buffer so bytecount is correct.
|
350
|
-
body =
|
350
|
+
body = Buffer.from(body, config.encoding);
|
351
351
|
}
|
352
352
|
|
353
353
|
}
|
@@ -641,7 +641,7 @@ Needle.prototype.send_request = function(count, method, uri, config, post_data,
|
|
641
641
|
var chunk;
|
642
642
|
while ((chunk = this.read()) !== null) {
|
643
643
|
// We're either pushing buffers or objects, never strings.
|
644
|
-
if (typeof chunk == 'string') chunk =
|
644
|
+
if (typeof chunk == 'string') chunk = Buffer.from(chunk);
|
645
645
|
|
646
646
|
// Push all chunks to resp.body. We'll bind them in resp.end().
|
647
647
|
resp.body.push(chunk);
|