Skip to content

Commit 82ca12f

Browse files
committed
dist: recompile
1 parent 1a8e964 commit 82ca12f

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

dist/debug.js

+10-15
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Expose `debug()` as the module.
88
*/
99

10-
exports = module.exports = debug;
10+
exports = module.exports = debug.debug = debug;
1111
exports.coerce = coerce;
1212
exports.disable = disable;
1313
exports.enable = enable;
@@ -238,6 +238,8 @@ module.exports = function(val, options){
238238
*/
239239

240240
function parse(str) {
241+
str = '' + str;
242+
if (str.length > 10000) return;
241243
var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);
242244
if (!match) return;
243245
var n = parseFloat(match[1]);
@@ -336,17 +338,10 @@ exports.formatArgs = formatArgs;
336338
exports.save = save;
337339
exports.load = load;
338340
exports.useColors = useColors;
339-
340-
/**
341-
* Use chrome.storage.local if we are in an app
342-
*/
343-
344-
var storage;
345-
346-
if (typeof chrome !== 'undefined' && typeof chrome.storage !== 'undefined')
347-
storage = chrome.storage.local;
348-
else
349-
storage = localstorage();
341+
exports.storage = 'undefined' != typeof chrome
342+
&& 'undefined' != typeof chrome.storage
343+
? chrome.storage.local
344+
: localstorage();
350345

351346
/**
352347
* Colors.
@@ -454,9 +449,9 @@ function log() {
454449
function save(namespaces) {
455450
try {
456451
if (null == namespaces) {
457-
storage.removeItem('debug');
452+
exports.storage.removeItem('debug');
458453
} else {
459-
storage.debug = namespaces;
454+
exports.storage.debug = namespaces;
460455
}
461456
} catch(e) {}
462457
}
@@ -471,7 +466,7 @@ function save(namespaces) {
471466
function load() {
472467
var r;
473468
try {
474-
r = storage.debug;
469+
r = exports.storage.debug;
475470
} catch(e) {}
476471
return r;
477472
}

0 commit comments

Comments
 (0)