fsevents 1.0.17 → 1.0.18-0
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/node_modules/abbrev/abbrev.js +0 -1
- package/node_modules/abbrev/package.json +16 -13
- package/node_modules/ansi-regex/index.js +1 -1
- package/node_modules/ansi-regex/package.json +32 -21
- package/node_modules/ansi-regex/readme.md +10 -2
- package/node_modules/aproba/README.md +33 -3
- package/node_modules/aproba/index.js +71 -30
- package/node_modules/aproba/package.json +14 -14
- package/node_modules/aws4/aws4.js +15 -6
- package/node_modules/aws4/package.json +10 -10
- package/node_modules/bcrypt-pbkdf/index.js +1 -4
- package/node_modules/bcrypt-pbkdf/package.json +24 -12
- package/node_modules/gauge/CHANGELOG.md +10 -0
- package/node_modules/gauge/index.js +9 -6
- package/node_modules/gauge/package.json +11 -12
- package/node_modules/jsbn/index.js +8 -9
- package/node_modules/jsbn/package.json +15 -11
- package/node_modules/mime-db/HISTORY.md +16 -0
- package/node_modules/mime-db/db.json +41 -2
- package/node_modules/mime-db/package.json +23 -22
- package/node_modules/mime-types/HISTORY.md +6 -0
- package/node_modules/mime-types/package.json +14 -13
- package/node_modules/node-pre-gyp/CHANGELOG.md +4 -0
- package/node_modules/node-pre-gyp/lib/node-pre-gyp.js +1 -1
- package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +52 -0
- package/node_modules/node-pre-gyp/package.json +15 -19
- package/node_modules/object-assign/index.js +11 -4
- package/node_modules/object-assign/package.json +22 -18
- package/node_modules/object-assign/readme.md +8 -3
- package/node_modules/qs/.eslintrc +3 -3
- package/node_modules/qs/CHANGELOG.md +12 -0
- package/node_modules/qs/README.md +34 -1
- package/node_modules/qs/dist/qs.js +32 -19
- package/node_modules/qs/lib/parse.js +9 -9
- package/node_modules/qs/lib/stringify.js +22 -9
- package/node_modules/qs/lib/utils.js +1 -1
- package/node_modules/qs/package.json +17 -17
- package/node_modules/qs/test/.eslintrc +1 -0
- package/node_modules/qs/test/parse.js +29 -4
- package/node_modules/qs/test/stringify.js +1 -1
- package/node_modules/rc/package.json +14 -10
- package/node_modules/sshpk/lib/identity.js +23 -1
- package/node_modules/sshpk/package.json +10 -10
- package/node_modules/strip-json-comments/index.js +70 -0
- package/node_modules/strip-json-comments/package.json +28 -30
- package/node_modules/strip-json-comments/readme.md +12 -28
- package/node_modules/supports-color/index.js +20 -2
- package/node_modules/supports-color/package.json +32 -31
- package/node_modules/supports-color/readme.md +6 -14
- package/package.json +2 -5
- package/node_modules/chalk/node_modules/supports-color/index.js +0 -50
- package/node_modules/chalk/node_modules/supports-color/package.json +0 -113
- package/node_modules/chalk/node_modules/supports-color/readme.md +0 -36
- package/node_modules/qs/CONTRIBUTING.md +0 -1
- package/node_modules/strip-json-comments/cli.js +0 -41
- package/node_modules/strip-json-comments/strip-json-comments.js +0 -73
- package/node_modules/supports-color/cli.js +0 -28
- /package/node_modules/{chalk/node_modules/supports-color → supports-color}/license +0 -0
@@ -1,10 +1,28 @@
|
|
1
1
|
'use strict';
|
2
|
+
var argv = process.argv;
|
3
|
+
|
4
|
+
var terminator = argv.indexOf('--');
|
5
|
+
var hasFlag = function (flag) {
|
6
|
+
flag = '--' + flag;
|
7
|
+
var pos = argv.indexOf(flag);
|
8
|
+
return pos !== -1 && (terminator !== -1 ? pos < terminator : true);
|
9
|
+
};
|
10
|
+
|
2
11
|
module.exports = (function () {
|
3
|
-
if (
|
12
|
+
if ('FORCE_COLOR' in process.env) {
|
13
|
+
return true;
|
14
|
+
}
|
15
|
+
|
16
|
+
if (hasFlag('no-color') ||
|
17
|
+
hasFlag('no-colors') ||
|
18
|
+
hasFlag('color=false')) {
|
4
19
|
return false;
|
5
20
|
}
|
6
21
|
|
7
|
-
if (
|
22
|
+
if (hasFlag('color') ||
|
23
|
+
hasFlag('colors') ||
|
24
|
+
hasFlag('color=true') ||
|
25
|
+
hasFlag('color=always')) {
|
8
26
|
return true;
|
9
27
|
}
|
10
28
|
|
@@ -2,76 +2,73 @@
|
|
2
2
|
"_args": [
|
3
3
|
[
|
4
4
|
{
|
5
|
-
"raw": "supports-color@^
|
5
|
+
"raw": "supports-color@^2.0.0",
|
6
6
|
"scope": null,
|
7
7
|
"escapedName": "supports-color",
|
8
8
|
"name": "supports-color",
|
9
|
-
"rawSpec": "^
|
10
|
-
"spec": ">=
|
9
|
+
"rawSpec": "^2.0.0",
|
10
|
+
"spec": ">=2.0.0 <3.0.0",
|
11
11
|
"type": "range"
|
12
12
|
},
|
13
|
-
"/Users/eshanker/Code/fsevents/node_modules/
|
13
|
+
"/Users/eshanker/Code/fsevents/node_modules/chalk"
|
14
14
|
]
|
15
15
|
],
|
16
|
-
"_from": "supports-color@>=
|
17
|
-
"_id": "supports-color@
|
16
|
+
"_from": "supports-color@>=2.0.0 <3.0.0",
|
17
|
+
"_id": "supports-color@2.0.0",
|
18
18
|
"_inCache": true,
|
19
19
|
"_location": "/supports-color",
|
20
|
+
"_nodeVersion": "0.12.5",
|
20
21
|
"_npmUser": {
|
21
22
|
"name": "sindresorhus",
|
22
23
|
"email": "sindresorhus@gmail.com"
|
23
24
|
},
|
24
|
-
"_npmVersion": "
|
25
|
+
"_npmVersion": "2.11.2",
|
25
26
|
"_phantomChildren": {},
|
26
27
|
"_requested": {
|
27
|
-
"raw": "supports-color@^
|
28
|
+
"raw": "supports-color@^2.0.0",
|
28
29
|
"scope": null,
|
29
30
|
"escapedName": "supports-color",
|
30
31
|
"name": "supports-color",
|
31
|
-
"rawSpec": "^
|
32
|
-
"spec": ">=
|
32
|
+
"rawSpec": "^2.0.0",
|
33
|
+
"spec": ">=2.0.0 <3.0.0",
|
33
34
|
"type": "range"
|
34
35
|
},
|
35
36
|
"_requiredBy": [
|
36
|
-
"/
|
37
|
+
"/chalk"
|
37
38
|
],
|
38
|
-
"_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-
|
39
|
-
"_shasum": "
|
39
|
+
"_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
|
40
|
+
"_shasum": "535d045ce6b6363fa40117084629995e9df324c7",
|
40
41
|
"_shrinkwrap": null,
|
41
|
-
"_spec": "supports-color@^
|
42
|
-
"_where": "/Users/eshanker/Code/fsevents/node_modules/
|
42
|
+
"_spec": "supports-color@^2.0.0",
|
43
|
+
"_where": "/Users/eshanker/Code/fsevents/node_modules/chalk",
|
43
44
|
"author": {
|
44
45
|
"name": "Sindre Sorhus",
|
45
46
|
"email": "sindresorhus@gmail.com",
|
46
|
-
"url": "
|
47
|
-
},
|
48
|
-
"bin": {
|
49
|
-
"supports-color": "cli.js"
|
47
|
+
"url": "sindresorhus.com"
|
50
48
|
},
|
51
49
|
"bugs": {
|
52
|
-
"url": "https://github.com/
|
50
|
+
"url": "https://github.com/chalk/supports-color/issues"
|
53
51
|
},
|
54
52
|
"dependencies": {},
|
55
53
|
"description": "Detect whether a terminal supports color",
|
56
54
|
"devDependencies": {
|
57
|
-
"mocha": "*"
|
55
|
+
"mocha": "*",
|
56
|
+
"require-uncached": "^1.0.2"
|
58
57
|
},
|
59
58
|
"directories": {},
|
60
59
|
"dist": {
|
61
|
-
"shasum": "
|
62
|
-
"tarball": "https://registry.npmjs.org/supports-color/-/supports-color-
|
60
|
+
"shasum": "535d045ce6b6363fa40117084629995e9df324c7",
|
61
|
+
"tarball": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz"
|
63
62
|
},
|
64
63
|
"engines": {
|
65
|
-
"node": ">=0.
|
64
|
+
"node": ">=0.8.0"
|
66
65
|
},
|
67
66
|
"files": [
|
68
|
-
"index.js"
|
69
|
-
"cli.js"
|
67
|
+
"index.js"
|
70
68
|
],
|
71
|
-
"
|
69
|
+
"gitHead": "8400d98ade32b2adffd50902c06d9e725a5c6588",
|
70
|
+
"homepage": "https://github.com/chalk/supports-color",
|
72
71
|
"keywords": [
|
73
|
-
"cli",
|
74
|
-
"bin",
|
75
72
|
"color",
|
76
73
|
"colour",
|
77
74
|
"colors",
|
@@ -96,6 +93,10 @@
|
|
96
93
|
{
|
97
94
|
"name": "sindresorhus",
|
98
95
|
"email": "sindresorhus@gmail.com"
|
96
|
+
},
|
97
|
+
{
|
98
|
+
"name": "jbnicolai",
|
99
|
+
"email": "jappelman@xebia.com"
|
99
100
|
}
|
100
101
|
],
|
101
102
|
"name": "supports-color",
|
@@ -103,10 +104,10 @@
|
|
103
104
|
"readme": "ERROR: No README data found!",
|
104
105
|
"repository": {
|
105
106
|
"type": "git",
|
106
|
-
"url": "git://github.com/
|
107
|
+
"url": "git+https://github.com/chalk/supports-color.git"
|
107
108
|
},
|
108
109
|
"scripts": {
|
109
110
|
"test": "mocha"
|
110
111
|
},
|
111
|
-
"version": "
|
112
|
+
"version": "2.0.0"
|
112
113
|
}
|
@@ -1,11 +1,11 @@
|
|
1
|
-
# supports-color [](https://travis-ci.org/chalk/supports-color)
|
2
2
|
|
3
3
|
> Detect whether a terminal supports color
|
4
4
|
|
5
5
|
|
6
6
|
## Install
|
7
7
|
|
8
|
-
```
|
8
|
+
```
|
9
9
|
$ npm install --save supports-color
|
10
10
|
```
|
11
11
|
|
@@ -22,21 +22,13 @@ if (supportsColor) {
|
|
22
22
|
|
23
23
|
It obeys the `--color` and `--no-color` CLI flags.
|
24
24
|
|
25
|
+
For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`.
|
25
26
|
|
26
|
-
## CLI
|
27
|
-
|
28
|
-
```sh
|
29
|
-
$ npm install --global supports-color
|
30
|
-
```
|
31
27
|
|
32
|
-
|
33
|
-
$ supports-color --help
|
28
|
+
## Related
|
34
29
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
# Exits with code 0 if color is supported and 1 if not
|
39
|
-
```
|
30
|
+
- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module
|
31
|
+
- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
|
40
32
|
|
41
33
|
|
42
34
|
## License
|
package/package.json
CHANGED
@@ -1,20 +1,17 @@
|
|
1
1
|
{
|
2
2
|
"name": "fsevents",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.18-0",
|
4
4
|
"description": "Native Access to Mac OS-X FSEvents",
|
5
5
|
"main": "fsevents.js",
|
6
6
|
"dependencies": {
|
7
7
|
"nan": "^2.3.0",
|
8
8
|
"node-pre-gyp": "^0.6.29"
|
9
9
|
},
|
10
|
-
"os": [
|
11
|
-
"darwin"
|
12
|
-
],
|
13
10
|
"engines": {
|
14
11
|
"node": ">=0.8.0"
|
15
12
|
},
|
16
13
|
"scripts": {
|
17
|
-
"install": "node
|
14
|
+
"install": "node install",
|
18
15
|
"prepublish": "if [ $(npm -v | head -c 1) -lt 3 ]; then exit 1; fi && npm dedupe",
|
19
16
|
"test": "tap ./test"
|
20
17
|
},
|
@@ -1,50 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
var argv = process.argv;
|
3
|
-
|
4
|
-
var terminator = argv.indexOf('--');
|
5
|
-
var hasFlag = function (flag) {
|
6
|
-
flag = '--' + flag;
|
7
|
-
var pos = argv.indexOf(flag);
|
8
|
-
return pos !== -1 && (terminator !== -1 ? pos < terminator : true);
|
9
|
-
};
|
10
|
-
|
11
|
-
module.exports = (function () {
|
12
|
-
if ('FORCE_COLOR' in process.env) {
|
13
|
-
return true;
|
14
|
-
}
|
15
|
-
|
16
|
-
if (hasFlag('no-color') ||
|
17
|
-
hasFlag('no-colors') ||
|
18
|
-
hasFlag('color=false')) {
|
19
|
-
return false;
|
20
|
-
}
|
21
|
-
|
22
|
-
if (hasFlag('color') ||
|
23
|
-
hasFlag('colors') ||
|
24
|
-
hasFlag('color=true') ||
|
25
|
-
hasFlag('color=always')) {
|
26
|
-
return true;
|
27
|
-
}
|
28
|
-
|
29
|
-
if (process.stdout && !process.stdout.isTTY) {
|
30
|
-
return false;
|
31
|
-
}
|
32
|
-
|
33
|
-
if (process.platform === 'win32') {
|
34
|
-
return true;
|
35
|
-
}
|
36
|
-
|
37
|
-
if ('COLORTERM' in process.env) {
|
38
|
-
return true;
|
39
|
-
}
|
40
|
-
|
41
|
-
if (process.env.TERM === 'dumb') {
|
42
|
-
return false;
|
43
|
-
}
|
44
|
-
|
45
|
-
if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {
|
46
|
-
return true;
|
47
|
-
}
|
48
|
-
|
49
|
-
return false;
|
50
|
-
})();
|
@@ -1,113 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"_args": [
|
3
|
-
[
|
4
|
-
{
|
5
|
-
"raw": "supports-color@^2.0.0",
|
6
|
-
"scope": null,
|
7
|
-
"escapedName": "supports-color",
|
8
|
-
"name": "supports-color",
|
9
|
-
"rawSpec": "^2.0.0",
|
10
|
-
"spec": ">=2.0.0 <3.0.0",
|
11
|
-
"type": "range"
|
12
|
-
},
|
13
|
-
"/Users/eshanker/Code/fsevents/node_modules/chalk"
|
14
|
-
]
|
15
|
-
],
|
16
|
-
"_from": "supports-color@>=2.0.0 <3.0.0",
|
17
|
-
"_id": "supports-color@2.0.0",
|
18
|
-
"_inCache": true,
|
19
|
-
"_location": "/chalk/supports-color",
|
20
|
-
"_nodeVersion": "0.12.5",
|
21
|
-
"_npmUser": {
|
22
|
-
"name": "sindresorhus",
|
23
|
-
"email": "sindresorhus@gmail.com"
|
24
|
-
},
|
25
|
-
"_npmVersion": "2.11.2",
|
26
|
-
"_phantomChildren": {},
|
27
|
-
"_requested": {
|
28
|
-
"raw": "supports-color@^2.0.0",
|
29
|
-
"scope": null,
|
30
|
-
"escapedName": "supports-color",
|
31
|
-
"name": "supports-color",
|
32
|
-
"rawSpec": "^2.0.0",
|
33
|
-
"spec": ">=2.0.0 <3.0.0",
|
34
|
-
"type": "range"
|
35
|
-
},
|
36
|
-
"_requiredBy": [
|
37
|
-
"/chalk"
|
38
|
-
],
|
39
|
-
"_resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
|
40
|
-
"_shasum": "535d045ce6b6363fa40117084629995e9df324c7",
|
41
|
-
"_shrinkwrap": null,
|
42
|
-
"_spec": "supports-color@^2.0.0",
|
43
|
-
"_where": "/Users/eshanker/Code/fsevents/node_modules/chalk",
|
44
|
-
"author": {
|
45
|
-
"name": "Sindre Sorhus",
|
46
|
-
"email": "sindresorhus@gmail.com",
|
47
|
-
"url": "sindresorhus.com"
|
48
|
-
},
|
49
|
-
"bugs": {
|
50
|
-
"url": "https://github.com/chalk/supports-color/issues"
|
51
|
-
},
|
52
|
-
"dependencies": {},
|
53
|
-
"description": "Detect whether a terminal supports color",
|
54
|
-
"devDependencies": {
|
55
|
-
"mocha": "*",
|
56
|
-
"require-uncached": "^1.0.2"
|
57
|
-
},
|
58
|
-
"directories": {},
|
59
|
-
"dist": {
|
60
|
-
"shasum": "535d045ce6b6363fa40117084629995e9df324c7",
|
61
|
-
"tarball": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz"
|
62
|
-
},
|
63
|
-
"engines": {
|
64
|
-
"node": ">=0.8.0"
|
65
|
-
},
|
66
|
-
"files": [
|
67
|
-
"index.js"
|
68
|
-
],
|
69
|
-
"gitHead": "8400d98ade32b2adffd50902c06d9e725a5c6588",
|
70
|
-
"homepage": "https://github.com/chalk/supports-color",
|
71
|
-
"keywords": [
|
72
|
-
"color",
|
73
|
-
"colour",
|
74
|
-
"colors",
|
75
|
-
"terminal",
|
76
|
-
"console",
|
77
|
-
"cli",
|
78
|
-
"ansi",
|
79
|
-
"styles",
|
80
|
-
"tty",
|
81
|
-
"rgb",
|
82
|
-
"256",
|
83
|
-
"shell",
|
84
|
-
"xterm",
|
85
|
-
"command-line",
|
86
|
-
"support",
|
87
|
-
"supports",
|
88
|
-
"capability",
|
89
|
-
"detect"
|
90
|
-
],
|
91
|
-
"license": "MIT",
|
92
|
-
"maintainers": [
|
93
|
-
{
|
94
|
-
"name": "sindresorhus",
|
95
|
-
"email": "sindresorhus@gmail.com"
|
96
|
-
},
|
97
|
-
{
|
98
|
-
"name": "jbnicolai",
|
99
|
-
"email": "jappelman@xebia.com"
|
100
|
-
}
|
101
|
-
],
|
102
|
-
"name": "supports-color",
|
103
|
-
"optionalDependencies": {},
|
104
|
-
"readme": "ERROR: No README data found!",
|
105
|
-
"repository": {
|
106
|
-
"type": "git",
|
107
|
-
"url": "git+https://github.com/chalk/supports-color.git"
|
108
|
-
},
|
109
|
-
"scripts": {
|
110
|
-
"test": "mocha"
|
111
|
-
},
|
112
|
-
"version": "2.0.0"
|
113
|
-
}
|
@@ -1,36 +0,0 @@
|
|
1
|
-
# supports-color [](https://travis-ci.org/chalk/supports-color)
|
2
|
-
|
3
|
-
> Detect whether a terminal supports color
|
4
|
-
|
5
|
-
|
6
|
-
## Install
|
7
|
-
|
8
|
-
```
|
9
|
-
$ npm install --save supports-color
|
10
|
-
```
|
11
|
-
|
12
|
-
|
13
|
-
## Usage
|
14
|
-
|
15
|
-
```js
|
16
|
-
var supportsColor = require('supports-color');
|
17
|
-
|
18
|
-
if (supportsColor) {
|
19
|
-
console.log('Terminal supports color');
|
20
|
-
}
|
21
|
-
```
|
22
|
-
|
23
|
-
It obeys the `--color` and `--no-color` CLI flags.
|
24
|
-
|
25
|
-
For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`.
|
26
|
-
|
27
|
-
|
28
|
-
## Related
|
29
|
-
|
30
|
-
- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module
|
31
|
-
- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
|
32
|
-
|
33
|
-
|
34
|
-
## License
|
35
|
-
|
36
|
-
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
@@ -1 +0,0 @@
|
|
1
|
-
Please view our [hapijs contributing guide](https://github.com/hapijs/hapi/blob/master/CONTRIBUTING.md).
|
@@ -1,41 +0,0 @@
|
|
1
|
-
#!/usr/bin/env node
|
2
|
-
'use strict';
|
3
|
-
var fs = require('fs');
|
4
|
-
var strip = require('./strip-json-comments');
|
5
|
-
var input = process.argv[2];
|
6
|
-
|
7
|
-
|
8
|
-
function getStdin(cb) {
|
9
|
-
var ret = '';
|
10
|
-
|
11
|
-
process.stdin.setEncoding('utf8');
|
12
|
-
|
13
|
-
process.stdin.on('data', function (data) {
|
14
|
-
ret += data;
|
15
|
-
});
|
16
|
-
|
17
|
-
process.stdin.on('end', function () {
|
18
|
-
cb(ret);
|
19
|
-
});
|
20
|
-
}
|
21
|
-
|
22
|
-
if (process.argv.indexOf('-h') !== -1 || process.argv.indexOf('--help') !== -1) {
|
23
|
-
console.log('strip-json-comments input-file > output-file');
|
24
|
-
console.log('or');
|
25
|
-
console.log('strip-json-comments < input-file > output-file');
|
26
|
-
return;
|
27
|
-
}
|
28
|
-
|
29
|
-
if (process.argv.indexOf('-v') !== -1 || process.argv.indexOf('--version') !== -1) {
|
30
|
-
console.log(require('./package').version);
|
31
|
-
return;
|
32
|
-
}
|
33
|
-
|
34
|
-
if (input) {
|
35
|
-
process.stdout.write(strip(fs.readFileSync(input, 'utf8')));
|
36
|
-
return;
|
37
|
-
}
|
38
|
-
|
39
|
-
getStdin(function (data) {
|
40
|
-
process.stdout.write(strip(data));
|
41
|
-
});
|
@@ -1,73 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
strip-json-comments
|
3
|
-
Strip comments from JSON. Lets you use comments in your JSON files!
|
4
|
-
https://github.com/sindresorhus/strip-json-comments
|
5
|
-
by Sindre Sorhus
|
6
|
-
MIT License
|
7
|
-
*/
|
8
|
-
(function () {
|
9
|
-
'use strict';
|
10
|
-
|
11
|
-
var singleComment = 1;
|
12
|
-
var multiComment = 2;
|
13
|
-
|
14
|
-
function stripJsonComments(str) {
|
15
|
-
var currentChar;
|
16
|
-
var nextChar;
|
17
|
-
var insideString = false;
|
18
|
-
var insideComment = false;
|
19
|
-
var ret = '';
|
20
|
-
|
21
|
-
for (var i = 0; i < str.length; i++) {
|
22
|
-
currentChar = str[i];
|
23
|
-
nextChar = str[i + 1];
|
24
|
-
|
25
|
-
if (!insideComment && currentChar === '"') {
|
26
|
-
var escaped = str[i - 1] === '\\' && str[i - 2] !== '\\';
|
27
|
-
if (!insideComment && !escaped && currentChar === '"') {
|
28
|
-
insideString = !insideString;
|
29
|
-
}
|
30
|
-
}
|
31
|
-
|
32
|
-
if (insideString) {
|
33
|
-
ret += currentChar;
|
34
|
-
continue;
|
35
|
-
}
|
36
|
-
|
37
|
-
if (!insideComment && currentChar + nextChar === '//') {
|
38
|
-
insideComment = singleComment;
|
39
|
-
i++;
|
40
|
-
} else if (insideComment === singleComment && currentChar + nextChar === '\r\n') {
|
41
|
-
insideComment = false;
|
42
|
-
i++;
|
43
|
-
ret += currentChar;
|
44
|
-
ret += nextChar;
|
45
|
-
continue;
|
46
|
-
} else if (insideComment === singleComment && currentChar === '\n') {
|
47
|
-
insideComment = false;
|
48
|
-
} else if (!insideComment && currentChar + nextChar === '/*') {
|
49
|
-
insideComment = multiComment;
|
50
|
-
i++;
|
51
|
-
continue;
|
52
|
-
} else if (insideComment === multiComment && currentChar + nextChar === '*/') {
|
53
|
-
insideComment = false;
|
54
|
-
i++;
|
55
|
-
continue;
|
56
|
-
}
|
57
|
-
|
58
|
-
if (insideComment) {
|
59
|
-
continue;
|
60
|
-
}
|
61
|
-
|
62
|
-
ret += currentChar;
|
63
|
-
}
|
64
|
-
|
65
|
-
return ret;
|
66
|
-
}
|
67
|
-
|
68
|
-
if (typeof module !== 'undefined' && module.exports) {
|
69
|
-
module.exports = stripJsonComments;
|
70
|
-
} else {
|
71
|
-
window.stripJsonComments = stripJsonComments;
|
72
|
-
}
|
73
|
-
})();
|
@@ -1,28 +0,0 @@
|
|
1
|
-
#!/usr/bin/env node
|
2
|
-
'use strict';
|
3
|
-
var pkg = require('./package.json');
|
4
|
-
var supportsColor = require('./');
|
5
|
-
var input = process.argv[2];
|
6
|
-
|
7
|
-
function help() {
|
8
|
-
console.log([
|
9
|
-
pkg.description,
|
10
|
-
'',
|
11
|
-
'Usage',
|
12
|
-
' $ supports-color',
|
13
|
-
'',
|
14
|
-
'Exits with code 0 if color is supported and 1 if not'
|
15
|
-
].join('\n'));
|
16
|
-
}
|
17
|
-
|
18
|
-
if (!input || process.argv.indexOf('--help') !== -1) {
|
19
|
-
help();
|
20
|
-
return;
|
21
|
-
}
|
22
|
-
|
23
|
-
if (process.argv.indexOf('--version') !== -1) {
|
24
|
-
console.log(pkg.version);
|
25
|
-
return;
|
26
|
-
}
|
27
|
-
|
28
|
-
process.exit(supportsColor ? 0 : 1);
|
File without changes
|