entry-empty-emitter
Advanced tools
Comparing version 1.0.1 to 1.0.3
{ | ||
"name": "entry-empty-emitter", | ||
"version": "1.0.1", | ||
"version": "1.0.3", | ||
"description": "Extension of node event emitter. Providers information about entry and exit of key.", | ||
@@ -5,0 +5,0 @@ "main": "[entry-empty-emitter.html, EntryEmptyEmitter.min.js]", |
@@ -35,12 +35,12 @@ /** | ||
return this.keys; | ||
} | ||
}; | ||
EntryEmptyEmitter.prototype.reset = function(key){ | ||
delete this.keys[key]; | ||
} | ||
}; | ||
EntryEmptyEmitter.prototype.getCount = function(key){ | ||
return this.keys[key]; | ||
} | ||
}; | ||
module.exports = new EntryEmptyEmitter(); | ||
global.EntryEmptyEmitter = module.exports = new EntryEmptyEmitter(); |
@@ -8,4 +8,4 @@ !function e(t,n,r){function i(s,u){if(!n[s]){if(!t[s]){var c="function"==typeof require&&require | ||
return i(n?n:e)},f,f.exports,e,t,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<r.length;s++)i(r[s]) | ||
return i}({1:[function(e,t,n){function r(){i.call(this)}const i=e("events"),o=e("util") | ||
o.inherits(r,i),r.prototype.keys={},r.prototype.add=function(e){this.keys[e]?this.keys[e]++:this.keys[e]=1,1===this.keys[e]&&(this.emit("entry:"+e,e),this.emit("entry",e))},r.prototype.remove=function(e){this.keys[e]?this.keys[e]--:this.keys[e]=0,this.keys[e]<=0&&(this.keys[e]=0,this.emit("empty",e),this.emit("empty:"+e,e))},r.prototype.status=function(){return this.keys},r.prototype.reset=function(e){delete this.keys[e]},r.prototype.getCount=function(e){return this.keys[e]},t.exports=new r},{events:2,util:6}],2:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function o(e){return"number"==typeof e}function s(e){return"object"==typeof e&&null!==e}function u(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!o(e)||0>e||isNaN(e))throw TypeError("n must be a positive number") | ||
return i}({1:[function(e,t,n){(function(n){function r(){i.call(this)}const i=e("events"),o=e("util") | ||
o.inherits(r,i),r.prototype.keys={},r.prototype.add=function(e){this.keys[e]?this.keys[e]++:this.keys[e]=1,1===this.keys[e]&&(this.emit("entry:"+e,e),this.emit("entry",e))},r.prototype.remove=function(e){this.keys[e]?this.keys[e]--:this.keys[e]=0,this.keys[e]<=0&&(this.keys[e]=0,this.emit("empty",e),this.emit("empty:"+e,e))},r.prototype.status=function(){return this.keys},r.prototype.reset=function(e){delete this.keys[e]},r.prototype.getCount=function(e){return this.keys[e]},n.EntryEmptyEmitter=t.exports=new r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{events:2,util:6}],2:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function o(e){return"number"==typeof e}function s(e){return"object"==typeof e&&null!==e}function u(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!o(e)||0>e||isNaN(e))throw TypeError("n must be a positive number") | ||
return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,o,c,l | ||
@@ -58,10 +58,10 @@ if(this._events||(this._events={}),"error"===e&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t | ||
return e.stylize("[Function"+d+"]","special")}if(x(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp") | ||
if(E(t))return e.stylize(Date.prototype.toString.call(t),"date") | ||
if(L(t))return e.stylize(Date.prototype.toString.call(t),"date") | ||
if(O(t))return f(t)}var g="",m=!1,b=["{","}"] | ||
if(y(t)&&(m=!0,b=["[","]"]),j(t)){var w=t.name?": "+t.name:"" | ||
g=" [Function"+w+"]"}if(x(t)&&(g=" "+RegExp.prototype.toString.call(t)),E(t)&&(g=" "+Date.prototype.toUTCString.call(t)),O(t)&&(g=" "+f(t)),0===s.length&&(!m||0==t.length))return b[0]+g+b[1] | ||
g=" [Function"+w+"]"}if(x(t)&&(g=" "+RegExp.prototype.toString.call(t)),L(t)&&(g=" "+Date.prototype.toUTCString.call(t)),O(t)&&(g=" "+f(t)),0===s.length&&(!m||0==t.length))return b[0]+g+b[1] | ||
if(0>r)return x(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special") | ||
e.seen.push(t) | ||
var L | ||
return L=m?p(e,t,r,v,s):s.map(function(n){return a(e,t,r,v,n,m)}),e.seen.pop(),h(L,g,b)}function l(e,t){if(w(t))return e.stylize("undefined","undefined") | ||
var E | ||
return E=m?p(e,t,r,v,s):s.map(function(n){return a(e,t,r,v,n,m)}),e.seen.pop(),h(E,g,b)}function l(e,t){if(w(t))return e.stylize("undefined","undefined") | ||
if(_(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'" | ||
@@ -72,3 +72,3 @@ return e.stylize(n,"string")}return m(t)?e.stylize(""+t,"number"):v(t)?e.stylize(""+t,"boolean"):d(t)?e.stylize("null","null"):void 0}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,i){for(var o=[],s=0,u=t.length;u>s;++s)A(t,String(s))?o.push(a(e,t,n,r,String(s),!0)):o.push("") | ||
s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+u}function h(e,t,n){var r=0,i=e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0) | ||
return i>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function y(e){return Array.isArray(e)}function v(e){return"boolean"==typeof e}function d(e){return null===e}function g(e){return null==e}function m(e){return"number"==typeof e}function _(e){return"string"==typeof e}function b(e){return"symbol"==typeof e}function w(e){return void 0===e}function x(e){return L(e)&&"[object RegExp]"===S(e)}function L(e){return"object"==typeof e&&null!==e}function E(e){return L(e)&&"[object Date]"===S(e)}function O(e){return L(e)&&("[object Error]"===S(e)||e instanceof Error)}function j(e){return"function"==typeof e}function k(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function S(e){return Object.prototype.toString.call(e)}function z(e){return 10>e?"0"+e.toString(10):e.toString(10)}function D(){var e=new Date,t=[z(e.getHours()),z(e.getMinutes()),z(e.getSeconds())].join(":") | ||
return i>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function y(e){return Array.isArray(e)}function v(e){return"boolean"==typeof e}function d(e){return null===e}function g(e){return null==e}function m(e){return"number"==typeof e}function _(e){return"string"==typeof e}function b(e){return"symbol"==typeof e}function w(e){return void 0===e}function x(e){return E(e)&&"[object RegExp]"===S(e)}function E(e){return"object"==typeof e&&null!==e}function L(e){return E(e)&&"[object Date]"===S(e)}function O(e){return E(e)&&("[object Error]"===S(e)||e instanceof Error)}function j(e){return"function"==typeof e}function k(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function S(e){return Object.prototype.toString.call(e)}function z(e){return 10>e?"0"+e.toString(10):e.toString(10)}function D(){var e=new Date,t=[z(e.getHours()),z(e.getMinutes()),z(e.getSeconds())].join(":") | ||
return[e.getDate(),C[e.getMonth()],t].join(" ")}function A(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var N=/%[sdj%]/g | ||
@@ -80,3 +80,3 @@ n.format=function(e){if(!_(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(i(arguments[n])) | ||
case"%d":return Number(r[n++]) | ||
case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return e}}),u=r[n];o>n;u=r[++n])s+=d(u)||!L(u)?" "+u:" "+i(u) | ||
case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return e}}),u=r[n];o>n;u=r[++n])s+=d(u)||!E(u)?" "+u:" "+i(u) | ||
return s},n.deprecate=function(e,i){function o(){if(!s){if(t.throwDeprecation)throw new Error(i) | ||
@@ -91,6 +91,6 @@ t.traceDeprecation?console.trace(i):console.error(i),s=!0}return e.apply(this,arguments)}if(w(r.process))return function(){return n.deprecate(e,i).apply(this,arguments)} | ||
console.error("%s %d: %s",e,r,t)}}else U[e]=function(){} | ||
return U[e]},n.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},n.isArray=y,n.isBoolean=v,n.isNull=d,n.isNullOrUndefined=g,n.isNumber=m,n.isString=_,n.isSymbol=b,n.isUndefined=w,n.isRegExp=x,n.isObject=L,n.isDate=E,n.isError=O,n.isFunction=j,n.isPrimitive=k,n.isBuffer=e("./support/isBuffer") | ||
return U[e]},n.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},n.isArray=y,n.isBoolean=v,n.isNull=d,n.isNullOrUndefined=g,n.isNumber=m,n.isString=_,n.isSymbol=b,n.isUndefined=w,n.isRegExp=x,n.isObject=E,n.isDate=L,n.isError=O,n.isFunction=j,n.isPrimitive=k,n.isBuffer=e("./support/isBuffer") | ||
var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"] | ||
n.log=function(){console.log("%s - %s",D(),n.format.apply(n,arguments))},n.inherits=e("inherits"),n._extend=function(e,t){if(!t||!L(t))return e | ||
n.log=function(){console.log("%s - %s",D(),n.format.apply(n,arguments))},n.inherits=e("inherits"),n._extend=function(e,t){if(!t||!E(t))return e | ||
for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]] | ||
return e}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":5,_process:4,inherits:3}]},{},[1]) |
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | ||
(function (global){ | ||
/** | ||
@@ -36,17 +37,15 @@ * Created by AAravindan on 1/26/16. | ||
return this.keys; | ||
} | ||
}; | ||
EntryEmptyEmitter.prototype.reset = function(key){ | ||
delete this.keys[key]; | ||
} | ||
}; | ||
EntryEmptyEmitter.prototype.getCount = function(key){ | ||
return this.keys[key]; | ||
} | ||
}; | ||
module.exports = new EntryEmptyEmitter(); | ||
global.EntryEmptyEmitter = module.exports = new EntryEmptyEmitter(); | ||
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) | ||
},{"events":2,"util":6}],2:[function(require,module,exports){ | ||
@@ -53,0 +52,0 @@ // Copyright Joyent, Inc. and other Node contributors. |
{ | ||
"name": "entry-empty-emitter", | ||
"version": "1.0.1", | ||
"version": "1.0.3", | ||
"description": "Extension of node event emitter. Providers information about entry and exit of key.", | ||
@@ -5,0 +5,0 @@ "main": "EntryEmptyEmitter.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
80205
10
1075