Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

polling-emitter

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

polling-emitter - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0

4

index.js
/*!
*** polling-emitter 3.0.0
*** polling-emitter 3.1.0
*** Copyright © 2019, Jaid <jaid.jsx@gmail.com> (https://github.com/Jaid)

@@ -7,2 +7,2 @@ *** @license MIT

!*/
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(this,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=6)}([function(t,e,n){t.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=9)}([function(t,e,n){var r=n(5),o=n(13),i=n(14),s=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?o(t):i(t)}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(0),o=n(2);t.exports=function(t){if(!o(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){var r=n(0),o=n(1);t.exports=function(t){return"number"==typeof t||o(t)&&"[object Number]"==r(t)}},function(t,e,n){var r=n(10).Symbol;t.exports=r},function(t,e,n){var r=n(0),o=n(1);t.exports=function(t){return!0===t||!1===t||o(t)&&"[object Boolean]"==r(t)}},function(t,e,n){var r=n(0),o=n(15),i=n(1);t.exports=function(t){return"string"==typeof t||!o(t)&&i(t)&&"[object String]"==r(t)}},function(t,e){t.exports=function(t){return null==t}},function(t,e,n){n.r(e),n.d(e,"isEmpty",function(){return v});var r=n(6),o=n.n(r),i=n(2),s=n.n(i),c=n(3),u=n.n(c),a=n(4),f=n.n(a),l=n(7),p=n.n(l),h=n(8),d=n.n(h);const y=t=>{var e,n,r,i,c,a,l,h;return e=t,!d()(e)&&(n=t,!!u()(n)||(r=t,!!f()(r))||(i=t,o()(i)?!0===t:(c=t,p()(c)?t.trim().length>0:(a=t.length,f()(a)?t.length>0:(l=t.length,u()(l)?t.length()>0:(h=t,!!s()(h)&&Object.keys(t).length>0))))))},v=t=>!y(t);e.default=y},function(t,e,n){var r=n(11),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(12))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(5),o=Object.prototype,i=o.hasOwnProperty,s=o.toString,c=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,c),n=t[c];try{t[c]=void 0;var r=!0}catch(t){}var o=s.call(t);return r&&(e?t[c]=n:delete t[c]),o}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e){var n=Array.isArray;t.exports=n}])},function(t,e,n){var r=n(9).Symbol;t.exports=r},function(t,e,n){var r=n(7);t.exports=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),o.forEach(function(e){r(t,e,n[e])})}return t}},function(t,e,n){var r=n(8),o=n(14);t.exports=function(t){if(!o(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){var r=Object.prototype.hasOwnProperty,o="~";function i(){}function s(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function c(t,e,n,r,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");var c=new s(n,r||t,i),u=o?o+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],c]:t._events[u].push(c):(t._events[u]=c,t._eventsCount++),t}function u(t,e){0==--t._eventsCount?t._events=new i:delete t._events[e]}function a(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(o=!1)),a.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)r.call(t,e)&&n.push(o?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},a.prototype.listeners=function(t){var e=o?o+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,i=n.length,s=new Array(i);i>r;r++)s[r]=n[r].fn;return s},a.prototype.listenerCount=function(t){var e=o?o+t:t,n=this._events[e];return n?n.fn?1:n.length:0},a.prototype.emit=function(t,e,n,r,i,s){var c=o?o+t:t;if(!this._events[c])return!1;var u,a,f=this._events[c],l=arguments.length;if(f.fn){switch(f.once&&this.removeListener(t,f.fn,void 0,!0),l){case 1:return f.fn.call(f.context),!0;case 2:return f.fn.call(f.context,e),!0;case 3:return f.fn.call(f.context,e,n),!0;case 4:return f.fn.call(f.context,e,n,r),!0;case 5:return f.fn.call(f.context,e,n,r,i),!0;case 6:return f.fn.call(f.context,e,n,r,i,s),!0}for(a=1,u=new Array(l-1);l>a;a++)u[a-1]=arguments[a];f.fn.apply(f.context,u)}else{var p,h=f.length;for(a=0;h>a;a++)switch(f[a].once&&this.removeListener(t,f[a].fn,void 0,!0),l){case 1:f[a].fn.call(f[a].context);break;case 2:f[a].fn.call(f[a].context,e);break;case 3:f[a].fn.call(f[a].context,e,n);break;case 4:f[a].fn.call(f[a].context,e,n,r);break;default:if(!u)for(p=1,u=new Array(l-1);l>p;p++)u[p-1]=arguments[p];f[a].fn.apply(f[a].context,u)}}return!0},a.prototype.on=function(t,e,n){return c(this,t,e,n,!1)},a.prototype.once=function(t,e,n){return c(this,t,e,n,!0)},a.prototype.removeListener=function(t,e,n,r){var i=o?o+t:t;if(!this._events[i])return this;if(!e)return u(this,i),this;var s=this._events[i];if(s.fn)s.fn!==e||r&&!s.once||n&&s.context!==n||u(this,i);else{for(var c=0,a=[],f=s.length;f>c;c++)(s[c].fn!==e||r&&!s[c].once||n&&s[c].context!==n)&&a.push(s[c]);a.length?this._events[i]=1===a.length?a[0]:a:u(this,i)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=o?o+t:t,this._events[e]&&u(this,e)):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=o,a.EventEmitter=a,t.exports=a},function(t,e){t.exports=function(t,e,n={}){!function(t,e,n){if("function"!=typeof t)throw new TypeError('Argument 1, "func", must be a function.');if("number"==typeof e){if(!Number.isInteger(e)||0>e)throw new TypeError('Argument 2, "intervalLength", must be a non-negative integer or a function that returns a non-negative integer.')}else if("function"!=typeof e)throw new TypeError('Argument 2, "intervalLength", must be a non-negative integer or a function that returns a non-negative integer.');if("object"!=typeof n)throw new TypeError('Argument 3, "options", must be an object.');const r=["iterations","stopOnError"];if(Object.keys(n).forEach(t=>{if(!r.includes(t))throw new TypeError('Option "'+t+'" is not a valid option.')}),n.hasOwnProperty("iterations")&&n.iterations!==1/0&&(!Number.isInteger(n.iterations)||1>n.iterations))throw new TypeError('Option "iterations" must be Infinity or an integer greater than 0.');if(n.hasOwnProperty("stopOnError")&&"boolean"!=typeof n.stopOnError)throw new TypeError('Option "stopOnError" must be a boolean.')}(t,e,n);const r=Object.assign({iterations:1/0,stopOnError:!0},n);return new Promise((n,o)=>{const i=s=>{let c=!1;const u=()=>{c=!0},a=()=>{s===r.iterations||c?n():i(s+1)},f="function"==typeof e?e(s):e;"function"!=typeof e||Number.isInteger(f)&&f>=0?setTimeout(()=>{const e=t(s,u);e instanceof Promise?e.then(a).catch(t=>{r.stopOnError?o(t):a()}):o(new Error('Return value of "func" must be a Promise.'))},f):o(new Error('Function for "intervalLength" argument must return a non-negative integer.'))};i(1)})}},function(t,e,n){n.r(e);var r=n(2),o=n.n(r),i=n(3),s=n.n(i),c=n(4),u=n.n(c),a=n(0),f=n(5),l=n.n(f);const p=n(15)("polling-emitter");e.default=class extends u.a{constructor(t){super(),this.options=o()({pollInterval:6e4,invalidateInitialEntries:!1,autostart:!1,getIdFromEntry:t=>t.id},t),this.processedEntryIds=new Set,this.successfulRunsCount=0,this.isRunning=!1,this.options.fetchEntries&&(this.fetchEntries=this.options.fetchEntries),this.options.processEntry&&(this.processEntry=this.options.processEntry),this.options.handleError&&(this.handleError=this.options.handleError),this.options.autostart&&this.start()}start(){this.isRunning?p("Skipped start(), because PollingEmitter is already running"):(p("Starting PollingEmitter with an interval of %s ms",this.options.pollInterval),this.isRunning=!0,l()(async(t,e)=>{if(this.isRunning)try{var n,r;const e=await this.fetchEntries();if(this.successfulRunsCount++,this.options.invalidateInitialEntries&&1===this.successfulRunsCount){for(const t of e){const e=this.options.getIdFromEntry(t);this.processedEntryIds.add(e),p("Initially invalidated %s",e)}return}if(n=e,Object(a.isEmpty)(n))return;const i=t=>!this.hasAlreadyProcessedEntry(t),c=[];for(let t=0;t<=e.length-1;t++)i(e[t],t,e)&&c.push(e[t]);if(r=c,Object(a.isEmpty)(r))return;for(const t of c){var o;const e=this.options.getIdFromEntry(t);if(this.processedEntryIds.add(e),p("Invalidated %s",e),o=this.processEntry,s()(o)&&!1===await this.processEntry(t))return;this.emit("newEntry",t)}}catch(t){if(!this.handleError)throw p("Throwing error: %s",t),t;p("Handling error: %s",t),this.handleError(t)}else e()},this.options.pollInterval))}hasAlreadyProcessedEntry(t){return this.processedEntryIds.has(this.options.getIdFromEntry(t))}hasAlreadyProcessedEntryId(t){return this.processedEntryIds.has(t)}stop(){p("Stopping PollingEmitter"),this.isRunning=!1}}},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e,n){var r=n(1),o=n(12),i=n(13),s=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?o(t):i(t)}},function(t,e,n){var r=n(10),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(11))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(1),o=Object.prototype,i=o.hasOwnProperty,s=o.toString,c=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,c),n=t[c];try{t[c]=void 0;var r=!0}catch(t){}var o=s.call(t);return r&&(e?t[c]=n:delete t[c]),o}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){(function(r){e.log=function(...t){return"object"==typeof console&&console.log&&console.log(...t)},e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,o=0;e[0].replace(/%[a-zA-Z%]/g,t=>{"%%"!==t&&(r++,"%c"===t&&(o=r))}),e.splice(o,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}return!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG),t},e.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("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+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage=function(){try{return localStorage}catch(t){}}(),e.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"],t.exports=n(17)(e);const{formatters:o}=t.exports;o.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}).call(this,n(16))},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function c(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var u,a=[],f=!1,l=-1;function p(){f&&u&&(f=!1,u.length?a=u.concat(a):l=-1,a.length&&h())}function h(){if(!f){var t=c(p);f=!0;for(var e=a.length;e;){for(u=a,a=[];++l<e;)u&&u[l].run();l=-1,e=a.length}u=null,f=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function y(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];a.push(new d(t,e)),1!==a.length||f||c(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){t.exports=function(t){function e(t){let e=0;for(let n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n),e|=0;return r.colors[Math.abs(e)%r.colors.length]}function r(t){let n;function s(...t){if(!s.enabled)return;const e=s,o=Number(new Date),i=o-(n||o);e.diff=i,e.prev=n,e.curr=o,n=o,t[0]=r.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let c=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(n,o)=>{if("%%"===n)return n;c++;const i=r.formatters[o];if("function"==typeof i){const r=t[c];n=i.call(e,r),t.splice(c,1),c--}return n}),r.formatArgs.call(e,t),(e.log||r.log).apply(e,t)}return s.namespace=t,s.enabled=r.enabled(t),s.useColors=r.useColors(),s.color=e(t),s.destroy=o,s.extend=i,"function"==typeof r.init&&r.init(s),r.instances.push(s),s}function o(){const t=r.instances.indexOf(this);return-1!==t&&(r.instances.splice(t,1),!0)}function i(t,e){const n=r(this.namespace+(void 0===e?":":e)+t);return n.log=this.log,n}function s(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return r.debug=r,r.default=r,r.coerce=function(t){return t instanceof Error?t.stack||t.message:t},r.disable=function(){const t=[...r.names.map(s),...r.skips.map(s).map(t=>"-"+t)].join(",");return r.enable(""),t},r.enable=function(t){let e;r.save(t),r.names=[],r.skips=[];const n=("string"==typeof t?t:"").split(/[\s,]+/),o=n.length;for(e=0;o>e;e++)n[e]&&("-"===(t=n[e].replace(/\*/g,".*?"))[0]?r.skips.push(new RegExp("^"+t.substr(1)+"$")):r.names.push(new RegExp("^"+t+"$")));for(e=0;e<r.instances.length;e++){const t=r.instances[e];t.enabled=r.enabled(t.namespace)}},r.enabled=function(t){if("*"===t[t.length-1])return!0;let e,n;for(e=0,n=r.skips.length;n>e;e++)if(r.skips[e].test(t))return!1;for(e=0,n=r.names.length;n>e;e++)if(r.names[e].test(t))return!0;return!1},r.humanize=n(18),Object.keys(t).forEach(e=>{r[e]=t[e]}),r.instances=[],r.names=[],r.skips=[],r.formatters={},r.selectColor=e,r.enable(r.load()),r}},function(t,e){var n=1e3,r=6e4,o=36e5,i=24*o;function s(t,e,n,r){var o=e>=1.5*n;return Math.round(t/n)+" "+r+(o?"s":"")}t.exports=function(t,e){e=e||{};var c,u,a=typeof t;if("string"===a&&t.length>0)return function(t){if(100>=(t=String(t)).length){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var s=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*o;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(t);if("number"===a&&isFinite(t))return e.long?(c=t,u=Math.abs(c),i>u?o>u?r>u?n>u?c+" ms":s(c,u,n,"second"):s(c,u,r,"minute"):s(c,u,o,"hour"):s(c,u,i,"day")):function(t){var e=Math.abs(t);return i>e?o>e?r>e?n>e?t+"ms":Math.round(t/n)+"s":Math.round(t/r)+"m":Math.round(t/o)+"h":Math.round(t/i)+"d"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}}])});
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(this,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=6)}([function(t,e,n){t.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=9)}([function(t,e,n){var r=n(5),o=n(13),i=n(14),s=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?o(t):i(t)}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(0),o=n(2);t.exports=function(t){if(!o(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){var r=n(0),o=n(1);t.exports=function(t){return"number"==typeof t||o(t)&&"[object Number]"==r(t)}},function(t,e,n){var r=n(10).Symbol;t.exports=r},function(t,e,n){var r=n(0),o=n(1);t.exports=function(t){return!0===t||!1===t||o(t)&&"[object Boolean]"==r(t)}},function(t,e,n){var r=n(0),o=n(15),i=n(1);t.exports=function(t){return"string"==typeof t||!o(t)&&i(t)&&"[object String]"==r(t)}},function(t,e){t.exports=function(t){return null==t}},function(t,e,n){n.r(e),n.d(e,"isEmpty",function(){return v});var r=n(6),o=n.n(r),i=n(2),s=n.n(i),c=n(3),u=n.n(c),a=n(4),f=n.n(a),l=n(7),p=n.n(l),h=n(8),d=n.n(h);const y=t=>{var e,n,r,i,c,a,l,h;return e=t,!d()(e)&&(n=t,!!u()(n)||(r=t,!!f()(r))||(i=t,o()(i)?!0===t:(c=t,p()(c)?t.trim().length>0:(a=t.length,f()(a)?t.length>0:(l=t.length,u()(l)?t.length()>0:(h=t,!!s()(h)&&Object.keys(t).length>0))))))},v=t=>!y(t);e.default=y},function(t,e,n){var r=n(11),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(12))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(5),o=Object.prototype,i=o.hasOwnProperty,s=o.toString,c=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,c),n=t[c];try{t[c]=void 0;var r=!0}catch(t){}var o=s.call(t);return r&&(e?t[c]=n:delete t[c]),o}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e){var n=Array.isArray;t.exports=n}])},function(t,e,n){var r=n(9).Symbol;t.exports=r},function(t,e,n){var r=n(7);t.exports=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),o.forEach(function(e){r(t,e,n[e])})}return t}},function(t,e,n){var r=n(8),o=n(14);t.exports=function(t){if(!o(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){var r=Object.prototype.hasOwnProperty,o="~";function i(){}function s(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function c(t,e,n,r,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");var c=new s(n,r||t,i),u=o?o+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],c]:t._events[u].push(c):(t._events[u]=c,t._eventsCount++),t}function u(t,e){0==--t._eventsCount?t._events=new i:delete t._events[e]}function a(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(o=!1)),a.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)r.call(t,e)&&n.push(o?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},a.prototype.listeners=function(t){var e=o?o+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,i=n.length,s=new Array(i);i>r;r++)s[r]=n[r].fn;return s},a.prototype.listenerCount=function(t){var e=o?o+t:t,n=this._events[e];return n?n.fn?1:n.length:0},a.prototype.emit=function(t,e,n,r,i,s){var c=o?o+t:t;if(!this._events[c])return!1;var u,a,f=this._events[c],l=arguments.length;if(f.fn){switch(f.once&&this.removeListener(t,f.fn,void 0,!0),l){case 1:return f.fn.call(f.context),!0;case 2:return f.fn.call(f.context,e),!0;case 3:return f.fn.call(f.context,e,n),!0;case 4:return f.fn.call(f.context,e,n,r),!0;case 5:return f.fn.call(f.context,e,n,r,i),!0;case 6:return f.fn.call(f.context,e,n,r,i,s),!0}for(a=1,u=new Array(l-1);l>a;a++)u[a-1]=arguments[a];f.fn.apply(f.context,u)}else{var p,h=f.length;for(a=0;h>a;a++)switch(f[a].once&&this.removeListener(t,f[a].fn,void 0,!0),l){case 1:f[a].fn.call(f[a].context);break;case 2:f[a].fn.call(f[a].context,e);break;case 3:f[a].fn.call(f[a].context,e,n);break;case 4:f[a].fn.call(f[a].context,e,n,r);break;default:if(!u)for(p=1,u=new Array(l-1);l>p;p++)u[p-1]=arguments[p];f[a].fn.apply(f[a].context,u)}}return!0},a.prototype.on=function(t,e,n){return c(this,t,e,n,!1)},a.prototype.once=function(t,e,n){return c(this,t,e,n,!0)},a.prototype.removeListener=function(t,e,n,r){var i=o?o+t:t;if(!this._events[i])return this;if(!e)return u(this,i),this;var s=this._events[i];if(s.fn)s.fn!==e||r&&!s.once||n&&s.context!==n||u(this,i);else{for(var c=0,a=[],f=s.length;f>c;c++)(s[c].fn!==e||r&&!s[c].once||n&&s[c].context!==n)&&a.push(s[c]);a.length?this._events[i]=1===a.length?a[0]:a:u(this,i)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=o?o+t:t,this._events[e]&&u(this,e)):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=o,a.EventEmitter=a,t.exports=a},function(t,e){t.exports=function(t,e,n={}){!function(t,e,n){if("function"!=typeof t)throw new TypeError('Argument 1, "func", must be a function.');if("number"==typeof e){if(!Number.isInteger(e)||0>e)throw new TypeError('Argument 2, "intervalLength", must be a non-negative integer or a function that returns a non-negative integer.')}else if("function"!=typeof e)throw new TypeError('Argument 2, "intervalLength", must be a non-negative integer or a function that returns a non-negative integer.');if("object"!=typeof n)throw new TypeError('Argument 3, "options", must be an object.');const r=["iterations","stopOnError"];if(Object.keys(n).forEach(t=>{if(!r.includes(t))throw new TypeError('Option "'+t+'" is not a valid option.')}),n.hasOwnProperty("iterations")&&n.iterations!==1/0&&(!Number.isInteger(n.iterations)||1>n.iterations))throw new TypeError('Option "iterations" must be Infinity or an integer greater than 0.');if(n.hasOwnProperty("stopOnError")&&"boolean"!=typeof n.stopOnError)throw new TypeError('Option "stopOnError" must be a boolean.')}(t,e,n);const r=Object.assign({iterations:1/0,stopOnError:!0},n);return new Promise((n,o)=>{const i=s=>{let c=!1;const u=()=>{c=!0},a=()=>{s===r.iterations||c?n():i(s+1)},f="function"==typeof e?e(s):e;"function"!=typeof e||Number.isInteger(f)&&f>=0?setTimeout(()=>{const e=t(s,u);e instanceof Promise?e.then(a).catch(t=>{r.stopOnError?o(t):a()}):o(new Error('Return value of "func" must be a Promise.'))},f):o(new Error('Function for "intervalLength" argument must return a non-negative integer.'))};i(1)})}},function(t,e,n){n.r(e);var r=n(2),o=n.n(r),i=n(3),s=n.n(i),c=n(4),u=n.n(c),a=n(0),f=n(5),l=n.n(f);const p=n(15)("polling-emitter");e.default=class extends u.a{constructor(t){super(),this.options=o()({pollInterval:6e4,invalidateInitialEntries:!1,autostart:!1,getIdFromEntry:t=>t.id},t),this.processedEntryIds=new Set,this.successfulRunsCount=0,this.isRunning=!1,this.options.fetchEntries&&(this.fetchEntries=this.options.fetchEntries),this.options.processEntry&&(this.processEntry=this.options.processEntry),this.options.handleError&&(this.handleError=this.options.handleError),this.options.autostart&&this.start()}start(){this.isRunning?p("Skipped start(), because PollingEmitter is already running"):(p("Starting PollingEmitter with an interval of %s ms",this.options.pollInterval),this.isRunning=!0,l()(async(t,e)=>{if(this.isRunning)try{var n,r;const e=await this.fetchEntries();if(this.successfulRunsCount++,this.options.invalidateInitialEntries&&1===this.successfulRunsCount){for(const t of e){const e=this.options.getIdFromEntry(t);this.processedEntryIds.add(e),p("Initially invalidated %s",e),emit("initialEntry",t)}return}if(n=e,Object(a.isEmpty)(n))return;const i=t=>!this.hasAlreadyProcessedEntry(t),c=[];for(let t=0;t<=e.length-1;t++)i(e[t],t,e)&&c.push(e[t]);if(r=c,Object(a.isEmpty)(r))return;for(const t of c){var o;const e=this.options.getIdFromEntry(t);if(this.processedEntryIds.add(e),p("Invalidated %s",e),o=this.processEntry,s()(o)&&!1===await this.processEntry(t))return;this.emit("newEntry",t)}}catch(t){if(!this.handleError)throw p("Throwing error: %s",t),t;p("Handling error: %s",t),this.handleError(t)}else e()},this.options.pollInterval))}hasAlreadyProcessedEntry(t){return this.processedEntryIds.has(this.options.getIdFromEntry(t))}hasAlreadyProcessedEntryId(t){return this.processedEntryIds.has(t)}stop(){p("Stopping PollingEmitter"),this.isRunning=!1}}},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e,n){var r=n(1),o=n(12),i=n(13),s=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?o(t):i(t)}},function(t,e,n){var r=n(10),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(11))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(1),o=Object.prototype,i=o.hasOwnProperty,s=o.toString,c=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,c),n=t[c];try{t[c]=void 0;var r=!0}catch(t){}var o=s.call(t);return r&&(e?t[c]=n:delete t[c]),o}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){(function(r){e.log=function(...t){return"object"==typeof console&&console.log&&console.log(...t)},e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,o=0;e[0].replace(/%[a-zA-Z%]/g,t=>{"%%"!==t&&(r++,"%c"===t&&(o=r))}),e.splice(o,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}return!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG),t},e.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("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+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage=function(){try{return localStorage}catch(t){}}(),e.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"],t.exports=n(17)(e);const{formatters:o}=t.exports;o.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}).call(this,n(16))},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function c(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var u,a=[],f=!1,l=-1;function p(){f&&u&&(f=!1,u.length?a=u.concat(a):l=-1,a.length&&h())}function h(){if(!f){var t=c(p);f=!0;for(var e=a.length;e;){for(u=a,a=[];++l<e;)u&&u[l].run();l=-1,e=a.length}u=null,f=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function y(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];a.push(new d(t,e)),1!==a.length||f||c(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){t.exports=function(t){function e(t){let e=0;for(let n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n),e|=0;return r.colors[Math.abs(e)%r.colors.length]}function r(t){let n;function s(...t){if(!s.enabled)return;const e=s,o=Number(new Date),i=o-(n||o);e.diff=i,e.prev=n,e.curr=o,n=o,t[0]=r.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let c=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(n,o)=>{if("%%"===n)return n;c++;const i=r.formatters[o];if("function"==typeof i){const r=t[c];n=i.call(e,r),t.splice(c,1),c--}return n}),r.formatArgs.call(e,t),(e.log||r.log).apply(e,t)}return s.namespace=t,s.enabled=r.enabled(t),s.useColors=r.useColors(),s.color=e(t),s.destroy=o,s.extend=i,"function"==typeof r.init&&r.init(s),r.instances.push(s),s}function o(){const t=r.instances.indexOf(this);return-1!==t&&(r.instances.splice(t,1),!0)}function i(t,e){const n=r(this.namespace+(void 0===e?":":e)+t);return n.log=this.log,n}function s(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return r.debug=r,r.default=r,r.coerce=function(t){return t instanceof Error?t.stack||t.message:t},r.disable=function(){const t=[...r.names.map(s),...r.skips.map(s).map(t=>"-"+t)].join(",");return r.enable(""),t},r.enable=function(t){let e;r.save(t),r.names=[],r.skips=[];const n=("string"==typeof t?t:"").split(/[\s,]+/),o=n.length;for(e=0;o>e;e++)n[e]&&("-"===(t=n[e].replace(/\*/g,".*?"))[0]?r.skips.push(new RegExp("^"+t.substr(1)+"$")):r.names.push(new RegExp("^"+t+"$")));for(e=0;e<r.instances.length;e++){const t=r.instances[e];t.enabled=r.enabled(t.namespace)}},r.enabled=function(t){if("*"===t[t.length-1])return!0;let e,n;for(e=0,n=r.skips.length;n>e;e++)if(r.skips[e].test(t))return!1;for(e=0,n=r.names.length;n>e;e++)if(r.names[e].test(t))return!0;return!1},r.humanize=n(18),Object.keys(t).forEach(e=>{r[e]=t[e]}),r.instances=[],r.names=[],r.skips=[],r.formatters={},r.selectColor=e,r.enable(r.load()),r}},function(t,e){var n=1e3,r=6e4,o=36e5,i=24*o;function s(t,e,n,r){var o=e>=1.5*n;return Math.round(t/n)+" "+r+(o?"s":"")}t.exports=function(t,e){e=e||{};var c,u,a=typeof t;if("string"===a&&t.length>0)return function(t){if(100>=(t=String(t)).length){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var s=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*o;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(t);if("number"===a&&isFinite(t))return e.long?(c=t,u=Math.abs(c),i>u?o>u?r>u?n>u?c+" ms":s(c,u,n,"second"):s(c,u,r,"minute"):s(c,u,o,"hour"):s(c,u,i,"day")):function(t){var e=Math.abs(t);return i>e?o>e?r>e?n>e?t+"ms":Math.round(t/n)+"s":Math.round(t/r)+"m":Math.round(t/o)+"h":Math.round(t/i)+"d"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}}])});

@@ -1,1 +0,1 @@

{"author":{"name":"Jaid","email":"jaid.jsx@gmail.com","url":"https://github.com/Jaid"},"bugs":"https://github.com/Jaid/polling-emitter/issues","description":"Polls data from any source at given interval and fires events on changes.","homepage":"https://github.com/Jaid/polling-emitter","keywords":[],"license":"MIT","name":"polling-emitter","repository":"github:Jaid/polling-emitter","types":"index.d.ts","version":"3.0.0"}
{"author":{"name":"Jaid","email":"jaid.jsx@gmail.com","url":"https://github.com/Jaid"},"bugs":"https://github.com/Jaid/polling-emitter/issues","description":"Polls data from any source at given interval and fires events on changes.","homepage":"https://github.com/Jaid/polling-emitter","keywords":[],"license":"MIT","name":"polling-emitter","repository":"github:Jaid/polling-emitter","types":"index.d.ts","version":"3.1.0"}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc