@searchfe/debug
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -1,1 +0,1 @@ | ||
!function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var a="function"==typeof require&&require;if(!f&&a)return a(i,!0);if(u)return u(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n?n:r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}({},{},[]); | ||
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).debug=e()}}(function(){return function s(i,a,c){function u(n,e){if(!a[n]){if(!i[n]){var r="function"==typeof require&&require;if(!e&&r)return r(n,!0);if(f)return f(n,!0);var t=new Error("Cannot find module '"+n+"'");throw t.code="MODULE_NOT_FOUND",t}var o=a[n]={exports:{}};i[n][0].call(o.exports,function(e){return u(i[n][1][e]||e)},o,o.exports,s,i,a,c)}return a[n].exports}for(var f="function"==typeof require&&require,e=0;e<c.length;e++)u(c[e]);return u}({1:[function(e,n,c){function r(e){var t;function a(){if(a.enabled){var o=a,e=+new Date,n=e-(t||e);o.diff=n,o.prev=t,o.curr=e,t=e;for(var s=new Array(arguments.length),r=0;r<s.length;r++)s[r]=arguments[r];s[0]=c.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var i=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,function(e,n){if("%%"===e)return e;i++;var r=c.formatters[n];if("function"==typeof r){var t=s[i];e=r.call(o,t),s.splice(i,1),i--}return e}),c.formatArgs.call(o,s),(a.log||c.log||console.log.bind(console)).apply(o,s)}}return a.namespace=e,a.enabled=c.enabled(e),a.useColors=c.useColors(),a.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return c.colors[Math.abs(r)%c.colors.length]}(e),a.destroy=o,"function"==typeof c.init&&c.init(a),c.instances.push(a),a}function o(){var e=c.instances.indexOf(this);return-1!==e&&(c.instances.splice(e,1),!0)}(c=n.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},c.disable=function(){c.enable("")},c.enable=function(e){var n;c.save(e),c.names=[],c.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),t=r.length;for(n=0;n<t;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?c.skips.push(new RegExp("^"+e.substr(1)+"$")):c.names.push(new RegExp("^"+e+"$")));for(n=0;n<c.instances.length;n++){var o=c.instances[n];o.enabled=c.enabled(o.namespace)}},c.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=c.skips.length;n<r;n++)if(c.skips[n].test(e))return!1;for(n=0,r=c.names.length;n<r;n++)if(c.names[n].test(e))return!0;return!1},c.humanize=e("ms"),c.instances=[],c.names=[],c.skips=[],c.formatters={}},{ms:3}],2:[function(r,t,s){(function(n){function e(){var e;try{e=s.storage.debug}catch(e){}return!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG),e}(s=t.exports=r("./debug")).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},s.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+s.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var t=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(t++,"%c"===e&&(o=t))}),e.splice(o,0,r)},s.save=function(e){try{null==e?s.storage.removeItem("debug"):s.storage.debug=e}catch(e){}},s.load=e,s.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},s.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),s.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"],s.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},s.enable(e())}).call(this,r("_process"))},{"./debug":1,_process:4}],3:[function(e,n,r){var o=36e5,s=864e5;function i(e,n,r){if(!(e<n))return e<1.5*n?Math.floor(e/n)+" "+r:Math.ceil(e/n)+" "+r+"s"}n.exports=function(e,n){n=n||{};var r,t=typeof e;if("string"===t&&0<e.length)return function(e){if(100<(e=String(e)).length)return;var n=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!n)return;var r=parseFloat(n[1]);switch((n[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*r;case"days":case"day":case"d":return r*s;case"hours":case"hour":case"hrs":case"hr":case"h":return r*o;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*r;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}(e);if("number"===t&&!1===isNaN(e))return n.long?i(r=e,s,"day")||i(r,o,"hour")||i(r,6e4,"minute")||i(r,1e3,"second")||r+" ms":function(e){if(s<=e)return Math.round(e/s)+"d";if(o<=e)return Math.round(e/o)+"h";if(6e4<=e)return Math.round(e/6e4)+"m";if(1e3<=e)return Math.round(e/1e3)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],4:[function(e,n,r){var t,o,s=n.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(n){if(t===setTimeout)return setTimeout(n,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(n,0);try{return t(n,0)}catch(e){try{return t.call(null,n,0)}catch(e){return t.call(this,n,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(e){o=a}}();var u,f=[],l=!1,C=-1;function d(){l&&u&&(l=!1,u.length?f=u.concat(f):C=-1,f.length&&p())}function p(){if(!l){var e=c(d);l=!0;for(var n=f.length;n;){for(u=f,f=[];++C<n;)u&&u[C].run();C=-1,n=f.length}u=null,l=!1,function(n){if(o===clearTimeout)return clearTimeout(n);if((o===a||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(n);try{o(n)}catch(e){try{return o.call(null,n)}catch(e){return o.call(this,n)}}}(e)}}function h(e,n){this.fun=e,this.array=n}function m(){}s.nextTick=function(e){var n=new Array(arguments.length-1);if(1<arguments.length)for(var r=1;r<arguments.length;r++)n[r-1]=arguments[r];f.push(new h(e,n)),1!==f.length||l||c(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=m,s.addListener=m,s.once=m,s.off=m,s.removeListener=m,s.removeAllListeners=m,s.emit=m,s.prependListener=m,s.prependOnceListener=m,s.listeners=function(e){return[]},s.binding=function(e){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(e){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},{}]},{},[2])(2)}); |
{ | ||
"name": "@searchfe/debug", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "umd port for npm debug", | ||
"main": "index.js", | ||
"scripts": { | ||
"dist": "browserify -s node_modules/debug | uglifyjs -c -m > index.js", | ||
"dist": "browserify -s debug node_modules/debug | uglifyjs -c -m > index.js", | ||
"postversion": "git push --tags", | ||
@@ -26,5 +26,6 @@ "test": "echo \"Error: no test specified\" && exit 1" | ||
"devDependencies": { | ||
"browserify": "^16.2.2", | ||
"debug": "^3.1.0", | ||
"uglifyjs": "^2.4.11" | ||
"uglify-js": "^3.4.7" | ||
} | ||
} |
8955
42
3