fsevents 1.2.8 → 1.2.12

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.
Files changed (187) hide show
  1. package/.travis.yml +1 -0
  2. package/binding.gyp +1 -9
  3. package/fsevents.cc +8 -11
  4. package/fsevents.js +1 -3
  5. package/node_modules/abbrev/package.json +1 -1
  6. package/node_modules/ansi-regex/package.json +1 -1
  7. package/node_modules/aproba/package.json +1 -1
  8. package/node_modules/are-we-there-yet/package.json +1 -1
  9. package/node_modules/balanced-match/package.json +1 -1
  10. package/node_modules/brace-expansion/package.json +1 -1
  11. package/node_modules/chownr/chownr.js +98 -19
  12. package/node_modules/chownr/package.json +13 -10
  13. package/node_modules/code-point-at/package.json +1 -1
  14. package/node_modules/concat-map/package.json +1 -1
  15. package/node_modules/console-control-strings/package.json +1 -1
  16. package/node_modules/core-util-is/package.json +1 -1
  17. package/node_modules/debug/README.md +0 -18
  18. package/node_modules/debug/dist/debug.js +2 -28
  19. package/node_modules/debug/node.js +1 -0
  20. package/node_modules/debug/package.json +12 -24
  21. package/node_modules/debug/src/browser.js +103 -187
  22. package/node_modules/debug/src/common.js +240 -257
  23. package/node_modules/debug/src/index.js +5 -3
  24. package/node_modules/debug/src/node.js +82 -165
  25. package/node_modules/deep-extend/package.json +1 -1
  26. package/node_modules/delegates/package.json +1 -1
  27. package/node_modules/detect-libc/package.json +2 -2
  28. package/node_modules/fs-minipass/index.js +2 -1
  29. package/node_modules/fs-minipass/package.json +13 -10
  30. package/node_modules/fs.realpath/package.json +1 -1
  31. package/node_modules/gauge/package.json +1 -1
  32. package/node_modules/glob/LICENSE +6 -0
  33. package/node_modules/glob/README.md +8 -1
  34. package/node_modules/glob/package.json +9 -6
  35. package/node_modules/has-unicode/package.json +1 -1
  36. package/node_modules/iconv-lite/package.json +1 -1
  37. package/node_modules/ignore-walk/README.md +1 -1
  38. package/node_modules/ignore-walk/index.js +9 -5
  39. package/node_modules/ignore-walk/package.json +11 -8
  40. package/node_modules/inflight/package.json +1 -1
  41. package/node_modules/inherits/inherits.js +2 -0
  42. package/node_modules/inherits/inherits_browser.js +18 -14
  43. package/node_modules/inherits/package.json +8 -8
  44. package/node_modules/ini/package.json +1 -1
  45. package/node_modules/is-fullwidth-code-point/package.json +1 -1
  46. package/node_modules/isarray/package.json +1 -1
  47. package/node_modules/minimatch/package.json +1 -1
  48. package/node_modules/minimist/.travis.yml +4 -0
  49. package/node_modules/minimist/example/parse.js +1 -1
  50. package/node_modules/minimist/index.js +112 -54
  51. package/node_modules/minimist/package.json +17 -14
  52. package/node_modules/minimist/readme.markdown +28 -6
  53. package/node_modules/{rc/node_modules/minimist → minimist}/test/all_bool.js +0 -0
  54. package/node_modules/{rc/node_modules/minimist → minimist}/test/bool.js +12 -0
  55. package/node_modules/minimist/test/dash.js +7 -0
  56. package/node_modules/minimist/test/default_bool.js +15 -0
  57. package/node_modules/minimist/test/dotted.js +6 -0
  58. package/node_modules/{rc/node_modules/minimist → minimist}/test/kv_short.js +0 -0
  59. package/node_modules/{rc/node_modules/minimist → minimist}/test/num.js +0 -0
  60. package/node_modules/minimist/test/parse.js +23 -144
  61. package/node_modules/minimist/test/parse_modified.js +1 -1
  62. package/node_modules/minimist/test/proto.js +44 -0
  63. package/node_modules/{rc/node_modules/minimist → minimist}/test/stop_early.js +0 -0
  64. package/node_modules/{rc/node_modules/minimist → minimist}/test/unknown.js +0 -0
  65. package/node_modules/minipass/README.md +486 -4
  66. package/node_modules/minipass/index.js +190 -28
  67. package/node_modules/minipass/package.json +17 -14
  68. package/node_modules/minizlib/README.md +36 -27
  69. package/node_modules/minizlib/constants.js +73 -4
  70. package/node_modules/minizlib/index.js +137 -152
  71. package/node_modules/minizlib/package.json +12 -12
  72. package/node_modules/mkdirp/package.json +17 -10
  73. package/node_modules/ms/index.js +2 -2
  74. package/node_modules/ms/package.json +6 -6
  75. package/node_modules/ms/readme.md +1 -1
  76. package/node_modules/needle/.github/workflows/nodejs.yml +27 -0
  77. package/node_modules/needle/README.md +5 -5
  78. package/node_modules/needle/lib/needle.js +11 -3
  79. package/node_modules/needle/package.json +8 -8
  80. package/node_modules/needle/test/compression_spec.js +18 -0
  81. package/node_modules/needle/test/headers_spec.js +1 -1
  82. package/node_modules/node-pre-gyp/CHANGELOG.md +11 -0
  83. package/node_modules/node-pre-gyp/lib/install.js +44 -14
  84. package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +240 -0
  85. package/node_modules/node-pre-gyp/lib/util/napi.js +3 -2
  86. package/node_modules/node-pre-gyp/package.json +13 -13
  87. package/node_modules/nopt/lib/nopt.js +6 -1
  88. package/node_modules/nopt/package.json +15 -8
  89. package/node_modules/npm-bundled/index.js +13 -5
  90. package/node_modules/npm-bundled/package.json +9 -6
  91. package/node_modules/npm-normalize-package-bin/.github/settings.yml +2 -0
  92. package/node_modules/npm-normalize-package-bin/.npmignore +24 -0
  93. package/node_modules/npm-normalize-package-bin/LICENSE +15 -0
  94. package/node_modules/npm-normalize-package-bin/README.md +14 -0
  95. package/node_modules/npm-normalize-package-bin/index.js +60 -0
  96. package/node_modules/npm-normalize-package-bin/package-lock.json +3529 -0
  97. package/node_modules/npm-normalize-package-bin/package.json +58 -0
  98. package/node_modules/npm-normalize-package-bin/test/array.js +37 -0
  99. package/node_modules/npm-normalize-package-bin/test/nobin.js +35 -0
  100. package/node_modules/npm-normalize-package-bin/test/object.js +141 -0
  101. package/node_modules/npm-normalize-package-bin/test/string.js +37 -0
  102. package/node_modules/npm-packlist/index.js +55 -16
  103. package/node_modules/npm-packlist/package.json +18 -10
  104. package/node_modules/npmlog/package.json +1 -1
  105. package/node_modules/number-is-nan/package.json +1 -1
  106. package/node_modules/object-assign/package.json +1 -1
  107. package/node_modules/once/package.json +1 -1
  108. package/node_modules/os-homedir/package.json +1 -1
  109. package/node_modules/os-tmpdir/package.json +1 -1
  110. package/node_modules/osenv/package.json +1 -1
  111. package/node_modules/path-is-absolute/package.json +1 -1
  112. package/node_modules/process-nextick-args/index.js +2 -1
  113. package/node_modules/process-nextick-args/package.json +6 -6
  114. package/node_modules/rc/package.json +2 -2
  115. package/node_modules/readable-stream/.travis.yml +9 -30
  116. package/node_modules/readable-stream/lib/_stream_duplex.js +1 -1
  117. package/node_modules/readable-stream/lib/_stream_passthrough.js +1 -1
  118. package/node_modules/readable-stream/lib/_stream_readable.js +1 -1
  119. package/node_modules/readable-stream/lib/_stream_transform.js +1 -1
  120. package/node_modules/readable-stream/lib/_stream_writable.js +1 -1
  121. package/node_modules/readable-stream/package.json +6 -6
  122. package/node_modules/rimraf/package.json +7 -7
  123. package/node_modules/rimraf/rimraf.js +9 -1
  124. package/node_modules/safe-buffer/package.json +1 -1
  125. package/node_modules/safer-buffer/package.json +1 -1
  126. package/node_modules/sax/package.json +1 -1
  127. package/node_modules/semver/README.md +12 -11
  128. package/node_modules/semver/package.json +7 -7
  129. package/node_modules/set-blocking/package.json +1 -1
  130. package/node_modules/signal-exit/package.json +1 -1
  131. package/node_modules/string-width/package.json +1 -1
  132. package/node_modules/string_decoder/package.json +1 -1
  133. package/node_modules/strip-ansi/package.json +1 -1
  134. package/node_modules/strip-json-comments/package.json +1 -1
  135. package/node_modules/tar/lib/large-numbers.js +32 -27
  136. package/node_modules/tar/lib/mkdir.js +2 -2
  137. package/node_modules/tar/lib/parse.js +6 -1
  138. package/node_modules/tar/lib/read-entry.js +4 -0
  139. package/node_modules/tar/lib/write-entry.js +2 -2
  140. package/node_modules/tar/package.json +22 -18
  141. package/node_modules/util-deprecate/package.json +1 -1
  142. package/node_modules/wide-align/package.json +1 -1
  143. package/node_modules/wrappy/package.json +1 -1
  144. package/node_modules/yallist/package.json +11 -11
  145. package/node_modules/yallist/yallist.js +50 -0
  146. package/package.json +5 -15
  147. package/src/constants.cc +20 -20
  148. package/install.js +0 -7
  149. package/node_modules/mkdirp/.travis.yml +0 -8
  150. package/node_modules/mkdirp/examples/pow.js +0 -6
  151. package/node_modules/mkdirp/test/chmod.js +0 -41
  152. package/node_modules/mkdirp/test/clobber.js +0 -38
  153. package/node_modules/mkdirp/test/mkdirp.js +0 -28
  154. package/node_modules/mkdirp/test/opts_fs.js +0 -29
  155. package/node_modules/mkdirp/test/opts_fs_sync.js +0 -27
  156. package/node_modules/mkdirp/test/perm.js +0 -32
  157. package/node_modules/mkdirp/test/perm_sync.js +0 -36
  158. package/node_modules/mkdirp/test/race.js +0 -37
  159. package/node_modules/mkdirp/test/rel.js +0 -32
  160. package/node_modules/mkdirp/test/return.js +0 -25
  161. package/node_modules/mkdirp/test/return_sync.js +0 -24
  162. package/node_modules/mkdirp/test/root.js +0 -19
  163. package/node_modules/mkdirp/test/sync.js +0 -32
  164. package/node_modules/mkdirp/test/umask.js +0 -28
  165. package/node_modules/mkdirp/test/umask_sync.js +0 -32
  166. package/node_modules/needle/.npmignore +0 -6
  167. package/node_modules/needle/package-lock.json +0 -395
  168. package/node_modules/needle/test/keys/ssl.cert +0 -21
  169. package/node_modules/needle/test/keys/ssl.key +0 -27
  170. package/node_modules/nopt/.npmignore +0 -1
  171. package/node_modules/nopt/.travis.yml +0 -8
  172. package/node_modules/nopt/examples/my-program.js +0 -30
  173. package/node_modules/nopt/test/basic.js +0 -303
  174. package/node_modules/rc/node_modules/minimist/.travis.yml +0 -8
  175. package/node_modules/rc/node_modules/minimist/LICENSE +0 -18
  176. package/node_modules/rc/node_modules/minimist/example/parse.js +0 -2
  177. package/node_modules/rc/node_modules/minimist/index.js +0 -236
  178. package/node_modules/rc/node_modules/minimist/package.json +0 -73
  179. package/node_modules/rc/node_modules/minimist/readme.markdown +0 -91
  180. package/node_modules/rc/node_modules/minimist/test/dash.js +0 -31
  181. package/node_modules/rc/node_modules/minimist/test/default_bool.js +0 -35
  182. package/node_modules/rc/node_modules/minimist/test/dotted.js +0 -22
  183. package/node_modules/rc/node_modules/minimist/test/long.js +0 -31
  184. package/node_modules/rc/node_modules/minimist/test/parse.js +0 -197
  185. package/node_modules/rc/node_modules/minimist/test/parse_modified.js +0 -9
  186. package/node_modules/rc/node_modules/minimist/test/short.js +0 -67
  187. package/node_modules/rc/node_modules/minimist/test/whitespace.js +0 -8
@@ -1,99 +1,23 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
+
1
5
  /* eslint-env browser */
2
6
 
3
7
  /**
4
8
  * This is the web browser implementation of `debug()`.
5
9
  */
6
-
7
10
  exports.log = log;
8
11
  exports.formatArgs = formatArgs;
9
12
  exports.save = save;
10
13
  exports.load = load;
11
14
  exports.useColors = useColors;
12
15
  exports.storage = localstorage();
13
-
14
16
  /**
15
17
  * Colors.
16
18
  */
17
19
 
18
- exports.colors = [
19
- '#0000CC',
20
- '#0000FF',
21
- '#0033CC',
22
- '#0033FF',
23
- '#0066CC',
24
- '#0066FF',
25
- '#0099CC',
26
- '#0099FF',
27
- '#00CC00',
28
- '#00CC33',
29
- '#00CC66',
30
- '#00CC99',
31
- '#00CCCC',
32
- '#00CCFF',
33
- '#3300CC',
34
- '#3300FF',
35
- '#3333CC',
36
- '#3333FF',
37
- '#3366CC',
38
- '#3366FF',
39
- '#3399CC',
40
- '#3399FF',
41
- '#33CC00',
42
- '#33CC33',
43
- '#33CC66',
44
- '#33CC99',
45
- '#33CCCC',
46
- '#33CCFF',
47
- '#6600CC',
48
- '#6600FF',
49
- '#6633CC',
50
- '#6633FF',
51
- '#66CC00',
52
- '#66CC33',
53
- '#9900CC',
54
- '#9900FF',
55
- '#9933CC',
56
- '#9933FF',
57
- '#99CC00',
58
- '#99CC33',
59
- '#CC0000',
60
- '#CC0033',
61
- '#CC0066',
62
- '#CC0099',
63
- '#CC00CC',
64
- '#CC00FF',
65
- '#CC3300',
66
- '#CC3333',
67
- '#CC3366',
68
- '#CC3399',
69
- '#CC33CC',
70
- '#CC33FF',
71
- '#CC6600',
72
- '#CC6633',
73
- '#CC9900',
74
- '#CC9933',
75
- '#CCCC00',
76
- '#CCCC33',
77
- '#FF0000',
78
- '#FF0033',
79
- '#FF0066',
80
- '#FF0099',
81
- '#FF00CC',
82
- '#FF00FF',
83
- '#FF3300',
84
- '#FF3333',
85
- '#FF3366',
86
- '#FF3399',
87
- '#FF33CC',
88
- '#FF33FF',
89
- '#FF6600',
90
- '#FF6633',
91
- '#FF9900',
92
- '#FF9933',
93
- '#FFCC00',
94
- '#FFCC33'
95
- ];
96
-
20
+ exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
97
21
  /**
98
22
  * Currently only WebKit-based Web Inspectors, Firefox >= v31,
99
23
  * and the Firebug extension (any Firefox version) are known
@@ -101,130 +25,123 @@ exports.colors = [
101
25
  *
102
26
  * TODO: add a `localStorage` variable to explicitly enable/disable colors
103
27
  */
104
-
105
28
  // eslint-disable-next-line complexity
29
+
106
30
  function useColors() {
107
- // NB: In an Electron preload script, document will be defined but not fully
108
- // initialized. Since we know we're in Chrome, we'll just detect this case
109
- // explicitly
110
- if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
111
- return true;
112
- }
113
-
114
- // Internet Explorer and Edge do not support colors.
115
- if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
116
- return false;
117
- }
118
-
119
- // Is webkit? http://stackoverflow.com/a/16459606/376773
120
- // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
121
- return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
122
- // Is firebug? http://stackoverflow.com/a/398120/376773
123
- (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
124
- // Is firefox >= v31?
125
- // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
126
- (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
127
- // Double check webkit in userAgent just in case we are in a worker
128
- (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
129
- }
31
+ // NB: In an Electron preload script, document will be defined but not fully
32
+ // initialized. Since we know we're in Chrome, we'll just detect this case
33
+ // explicitly
34
+ if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
35
+ return true;
36
+ } // Internet Explorer and Edge do not support colors.
130
37
 
38
+
39
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
40
+ return false;
41
+ } // Is webkit? http://stackoverflow.com/a/16459606/376773
42
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
43
+
44
+
45
+ return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
46
+ typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
47
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
48
+ typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
49
+ typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
50
+ }
131
51
  /**
132
52
  * Colorize log arguments if enabled.
133
53
  *
134
54
  * @api public
135
55
  */
136
56
 
57
+
137
58
  function formatArgs(args) {
138
- args[0] = (this.useColors ? '%c' : '') +
139
- this.namespace +
140
- (this.useColors ? ' %c' : ' ') +
141
- args[0] +
142
- (this.useColors ? '%c ' : ' ') +
143
- '+' + module.exports.humanize(this.diff);
144
-
145
- if (!this.useColors) {
146
- return;
147
- }
148
-
149
- const c = 'color: ' + this.color;
150
- args.splice(1, 0, c, 'color: inherit');
151
-
152
- // The final "%c" is somewhat tricky, because there could be other
153
- // arguments passed either before or after the %c, so we need to
154
- // figure out the correct index to insert the CSS into
155
- let index = 0;
156
- let lastC = 0;
157
- args[0].replace(/%[a-zA-Z%]/g, match => {
158
- if (match === '%%') {
159
- return;
160
- }
161
- index++;
162
- if (match === '%c') {
163
- // We only are interested in the *last* %c
164
- // (the user may have provided their own)
165
- lastC = index;
166
- }
167
- });
168
-
169
- args.splice(lastC, 0, c);
59
+ args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
60
+
61
+ if (!this.useColors) {
62
+ return;
63
+ }
64
+
65
+ var c = 'color: ' + this.color;
66
+ args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other
67
+ // arguments passed either before or after the %c, so we need to
68
+ // figure out the correct index to insert the CSS into
69
+
70
+ var index = 0;
71
+ var lastC = 0;
72
+ args[0].replace(/%[a-zA-Z%]/g, function (match) {
73
+ if (match === '%%') {
74
+ return;
75
+ }
76
+
77
+ index++;
78
+
79
+ if (match === '%c') {
80
+ // We only are interested in the *last* %c
81
+ // (the user may have provided their own)
82
+ lastC = index;
83
+ }
84
+ });
85
+ args.splice(lastC, 0, c);
170
86
  }
171
-
172
87
  /**
173
88
  * Invokes `console.log()` when available.
174
89
  * No-op when `console.log` is not a "function".
175
90
  *
176
91
  * @api public
177
92
  */
178
- function log(...args) {
179
- // This hackery is required for IE8/9, where
180
- // the `console.log` function doesn't have 'apply'
181
- return typeof console === 'object' &&
182
- console.log &&
183
- console.log(...args);
184
- }
185
93
 
94
+
95
+ function log() {
96
+ var _console;
97
+
98
+ // This hackery is required for IE8/9, where
99
+ // the `console.log` function doesn't have 'apply'
100
+ return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments);
101
+ }
186
102
  /**
187
103
  * Save `namespaces`.
188
104
  *
189
105
  * @param {String} namespaces
190
106
  * @api private
191
107
  */
108
+
109
+
192
110
  function save(namespaces) {
193
- try {
194
- if (namespaces) {
195
- exports.storage.setItem('debug', namespaces);
196
- } else {
197
- exports.storage.removeItem('debug');
198
- }
199
- } catch (error) {
200
- // Swallow
201
- // XXX (@Qix-) should we be logging these?
202
- }
111
+ try {
112
+ if (namespaces) {
113
+ exports.storage.setItem('debug', namespaces);
114
+ } else {
115
+ exports.storage.removeItem('debug');
116
+ }
117
+ } catch (error) {// Swallow
118
+ // XXX (@Qix-) should we be logging these?
119
+ }
203
120
  }
204
-
205
121
  /**
206
122
  * Load `namespaces`.
207
123
  *
208
124
  * @return {String} returns the previously persisted debug modes
209
125
  * @api private
210
126
  */
127
+
128
+
211
129
  function load() {
212
- let r;
213
- try {
214
- r = exports.storage.getItem('debug');
215
- } catch (error) {
216
- // Swallow
217
- // XXX (@Qix-) should we be logging these?
218
- }
219
-
220
- // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
221
- if (!r && typeof process !== 'undefined' && 'env' in process) {
222
- r = process.env.DEBUG;
223
- }
224
-
225
- return r;
226
- }
130
+ var r;
227
131
 
132
+ try {
133
+ r = exports.storage.getItem('debug');
134
+ } catch (error) {} // Swallow
135
+ // XXX (@Qix-) should we be logging these?
136
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
137
+
138
+
139
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
140
+ r = process.env.DEBUG;
141
+ }
142
+
143
+ return r;
144
+ }
228
145
  /**
229
146
  * Localstorage attempts to return the localstorage.
230
147
  *
@@ -236,29 +153,28 @@ function load() {
236
153
  * @api private
237
154
  */
238
155
 
156
+
239
157
  function localstorage() {
240
- try {
241
- // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
242
- // The Browser also has localStorage in the global context.
243
- return localStorage;
244
- } catch (error) {
245
- // Swallow
246
- // XXX (@Qix-) should we be logging these?
247
- }
158
+ try {
159
+ // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
160
+ // The Browser also has localStorage in the global context.
161
+ return localStorage;
162
+ } catch (error) {// Swallow
163
+ // XXX (@Qix-) should we be logging these?
164
+ }
248
165
  }
249
166
 
250
167
  module.exports = require('./common')(exports);
251
-
252
- const {formatters} = module.exports;
253
-
168
+ var formatters = module.exports.formatters;
254
169
  /**
255
170
  * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
256
171
  */
257
172
 
258
173
  formatters.j = function (v) {
259
- try {
260
- return JSON.stringify(v);
261
- } catch (error) {
262
- return '[UnexpectedJSONParseError]: ' + error.message;
263
- }
174
+ try {
175
+ return JSON.stringify(v);
176
+ } catch (error) {
177
+ return '[UnexpectedJSONParseError]: ' + error.message;
178
+ }
264
179
  };
180
+