hypertimer
Advanced tools
Comparing version 2.1.3 to 3.0.0
@@ -9,4 +9,4 @@ /** | ||
* | ||
* @version 2.1.3 | ||
* @date 2015-12-08 | ||
* @version 3.0.0 | ||
* @date 2018-01-24 | ||
* | ||
@@ -28,3 +28,3 @@ * @license | ||
*/ | ||
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("ws"),require("debug")):"function"==typeof define&&define.amd?define(["ws","debug"],n):"object"==typeof exports?exports.hypertimer=n(require("ws"),require("debug")):t.hypertimer=n(t.ws,t.debug)}(this,function(t,n){return function(t){function n(r){if(e[r])return e[r].exports;var o=e[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var e={};return n.m=t,n.c=e,n.p="",n(0)}([function(t,n,e){t.exports=e(1)},function(t,n,e){function r(t){function n(){return{paced:y,rate:g,deterministic:w,time:_,master:b,port:x}}function e(t){if(R||t.master)for(var n in t)if("master"!==n&&"slave"!==n)throw new Error('Cannot apply configuration option "'+n+'", timer is configured as slave.')}function r(t){function e(t){var e=n();r(t);var o=n();D.emit("config",o,e)}if("deterministic"in t&&(w=t.deterministic?!0:!1),"paced"in t&&(y=t.paced?!0:!1),"time"in t&&(j=m(t.time),T=f.systemNow(),s(j),_=new Date(j).toISOString()),"rate"in t){var o=Number(t.rate);if(isNaN(o)||0>=o)throw new TypeError("Invalid rate "+JSON.stringify(t.rate)+". Rate must be a positive number");j=D.now(),T=f.systemNow(),g=o}"master"in t&&(R&&(R.destroy(),R=null),b=t.master,null!=t.master&&(R=c(t.master),R.on("change",function(t){e({time:t})}),R.on("config",function(t){e(t)}),R.on("error",function(t){D.emit("error",t)}))),"port"in t&&(I&&(I.destroy(),I=null),x=t.port,t.port&&(I=u(D.now,D.config,t.port),I.on("error",function(t){D.emit("error",t)}))),v(),I&&I.broadcastConfig()}function s(t){for(var n=0;n<N.length;n++){var e=N[n];e.type===a.INTERVAL&&l(e,t)}}function l(t,n){t.occurrence=Math.round((n-t.firstTime)/t.interval),t.time=t.firstTime+t.occurrence*t.interval}function p(t){if(N.length>0){for(var n=N.length-1;n>=0&&N[n].time>t.time;)n--;N.splice(n+1,0,t)}else N.push(t)}function h(t,n){function e(){t.type===a.INTERVAL&&E[t.id]&&(t.occurrence++,t.time=t.firstTime+t.occurrence*t.interval,p(t)),delete E[t.id],n&&n()}E[t.id]=t;try{0==t.callback.length?(t.callback(),e()):t.callback(e)}catch(r){i(D,"error")?D.emit("error",r):console.log("Error",r),e()}}function d(t){for(var n=0;n<N.length&&(N[n].time<=t||!isFinite(N[n].time));)n++;var e=N.splice(0,n);return 0==w&&f.shuffle(e),e}function v(){function t(){function t(){var e=n.shift();e?h(e,t):v()}y||(j=e>j&&isFinite(e)?e:j);var n=d(e);y?(n.forEach(function(t){h(t)}),v()):t()}if(y||!(Object.keys(E).length>0)){var n=N[0];if(k&&(clearTimeout(k),k=null),O&&n){var e=n.time,r=e-D.now(),o=y?r/g:0;k=setTimeout(t,Math.round(o))}}}function m(t){var n="number"==typeof t?t:t instanceof Date?t.valueOf():new Date(t).valueOf();if(isNaN(n))throw new TypeError("Invalid date "+JSON.stringify(t)+". Date, number, or ISOString expected");return n}var y=!0,g=1,w=!0,_=null,b=null,x=null,O=!1,T=null,j=f.systemNow(),N=[],E={},k=null,S=0,I=null,R=null,D=o({});return D.config=function(t){return t&&(e(t),r(t)),n()},D.now=function(){if(y){if(O){var t=f.systemNow()-T,n=t*g;return j+n}return j}return j},D["continue"]=function(){T=f.systemNow(),O=!0,v()},D.pause=function(){j=D.now(),T=null,O=!1,v()},D.getTime=function(){return new Date(D.now())},D.valueOf=D.getTime,D.toString=function(){return D.getTime().toString()},D.setTimeout=function(t,n){var e=S++,r=D.now()+n;if(isNaN(r))throw new TypeError("delay must be a number");return p({id:e,type:a.TIMEOUT,time:r,callback:t}),v(),e},D.setTrigger=function(t,n){var e=S++,r=m(n);return p({id:e,type:a.TRIGGER,time:r,callback:t}),v(),e},D.setInterval=function(t,n,e){var r=S++,o=Number(n);if(isNaN(o))throw new TypeError("interval must be a number");(0>o||!isFinite(o))&&(o=0);var i=void 0!=e?m(e):null,u=D.now(),c=null!=i?i:u+o,f={id:r,type:a.INTERVAL,interval:o,time:c,firstTime:null!=i?i:c,occurrence:0,callback:t};return u>c&&l(f,u),p(f),v(),r},D.clearTimeout=function(t){if(E[t])return void delete E[t];for(var n=0;n<N.length;n++)if(N[n].id===t){N.splice(n,1),v();break}},D.clearTrigger=D.clearTimeout,D.clearInterval=D.clearTimeout,D.list=function(){return N.map(function(t){return t.id})},D.clear=function(){E={},N=[],v()},D.destroy=function(){D.clear(),R&&R.destroy(),I&&I.destroy()},Object.defineProperty(D,"running",{get:function(){return O}}),D.config(t),D["continue"](),D}var o=e(2),i=e(17),u=e(19).createMaster,c=e(35).createSlave,f=e(38),a={TIMEOUT:0,INTERVAL:1,TRIGGER:2};t.exports=r},function(t,n,e){"use strict";var r,o,i,u,c,f,a,s=e(3),l=e(16),p=Function.prototype.apply,h=Function.prototype.call,d=Object.create,v=Object.defineProperty,m=Object.defineProperties,y=Object.prototype.hasOwnProperty,g={configurable:!0,enumerable:!1,writable:!0};r=function(t,n){var e;return l(n),y.call(this,"__ee__")?e=this.__ee__:(e=g.value=d(null),v(this,"__ee__",g),g.value=null),e[t]?"object"==typeof e[t]?e[t].push(n):e[t]=[e[t],n]:e[t]=n,this},o=function(t,n){var e,o;return l(n),o=this,r.call(this,t,e=function(){i.call(o,t,e),p.call(n,this,arguments)}),e.__eeOnceListener__=n,this},i=function(t,n){var e,r,o,i;if(l(n),!y.call(this,"__ee__"))return this;if(e=this.__ee__,!e[t])return this;if(r=e[t],"object"==typeof r)for(i=0;o=r[i];++i)(o===n||o.__eeOnceListener__===n)&&(2===r.length?e[t]=r[i?0:1]:r.splice(i,1));else(r===n||r.__eeOnceListener__===n)&&delete e[t];return this},u=function(t){var n,e,r,o,i;if(y.call(this,"__ee__")&&(o=this.__ee__[t]))if("object"==typeof o){for(e=arguments.length,i=new Array(e-1),n=1;e>n;++n)i[n-1]=arguments[n];for(o=o.slice(),n=0;r=o[n];++n)p.call(r,this,i)}else switch(arguments.length){case 1:h.call(o,this);break;case 2:h.call(o,this,arguments[1]);break;case 3:h.call(o,this,arguments[1],arguments[2]);break;default:for(e=arguments.length,i=new Array(e-1),n=1;e>n;++n)i[n-1]=arguments[n];p.call(o,this,i)}},c={on:r,once:o,off:i,emit:u},f={on:s(r),once:s(o),off:s(i),emit:s(u)},a=m({},f),t.exports=n=function(t){return null==t?d(a):m(Object(t),f)},n.methods=c},function(t,n,e){"use strict";var r,o=e(4),i=e(11),u=e(12),c=e(13);r=t.exports=function(t,n){var e,r,u,f,a;return arguments.length<2||"string"!=typeof t?(f=n,n=t,t=null):f=arguments[2],null==t?(e=u=!0,r=!1):(e=c.call(t,"c"),r=c.call(t,"e"),u=c.call(t,"w")),a={value:n,configurable:e,enumerable:r,writable:u},f?o(i(f),a):a},r.gs=function(t,n,e){var r,f,a,s;return"string"!=typeof t?(a=e,e=n,n=t,t=null):a=arguments[3],null==n?n=void 0:u(n)?null==e?e=void 0:u(e)||(a=e,e=void 0):(a=n,n=e=void 0),null==t?(r=!0,f=!1):(r=c.call(t,"c"),f=c.call(t,"e")),s={get:n,set:e,configurable:r,enumerable:f},a?o(i(a),s):s}},function(t,n,e){"use strict";t.exports=e(5)()?Object.assign:e(6)},function(t,n){"use strict";t.exports=function(){var t,n=Object.assign;return"function"!=typeof n?!1:(t={foo:"raz"},n(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},function(t,n,e){"use strict";var r=e(7),o=e(10),i=Math.max;t.exports=function(t,n){var e,u,c,f=i(arguments.length,2);for(t=Object(o(t)),c=function(r){try{t[r]=n[r]}catch(o){e||(e=o)}},u=1;f>u;++u)n=arguments[u],r(n).forEach(c);if(void 0!==e)throw e;return t}},function(t,n,e){"use strict";t.exports=e(8)()?Object.keys:e(9)},function(t,n){"use strict";t.exports=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}},function(t,n){"use strict";var e=Object.keys;t.exports=function(t){return e(null==t?t:Object(t))}},function(t,n){"use strict";t.exports=function(t){if(null==t)throw new TypeError("Cannot use null or undefined");return t}},function(t,n){"use strict";var e=Array.prototype.forEach,r=Object.create,o=function(t,n){var e;for(e in t)n[e]=t[e]};t.exports=function(t){var n=r(null);return e.call(arguments,function(t){null!=t&&o(Object(t),n)}),n}},function(t,n){"use strict";t.exports=function(t){return"function"==typeof t}},function(t,n,e){"use strict";t.exports=e(14)()?String.prototype.contains:e(15)},function(t,n){"use strict";var e="razdwatrzy";t.exports=function(){return"function"!=typeof e.contains?!1:e.contains("dwa")===!0&&e.contains("foo")===!1}},function(t,n){"use strict";var e=String.prototype.indexOf;t.exports=function(t){return e.call(this,t,arguments[1])>-1}},function(t,n){"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},function(t,n,e){"use strict";var r=e(18),o=e(10),i=Object.prototype.hasOwnProperty;t.exports=function(t){var n;return o(t),n=arguments[1],arguments.length>1?i.call(t,"__ee__")&&Boolean(t.__ee__[n]):t.hasOwnProperty("__ee__")&&!r(t.__ee__)}},function(t,n,e){"use strict";var r=e(10),o=Object.prototype.propertyIsEnumerable;t.exports=function(t){var n;r(t);for(n in t)if(o.call(t,n))return!1;return!0}},function(t,n,e){var r=e(20),o=e(22),i=e(33)("hypertimer:master");n.createMaster=function(t,n,e){function u(){var t=n();return delete t.time,delete t.master,delete t.port,t}var c=new r.Server({port:e});return c.on("connection",function(n){i("new connection");var e=o(n);e.on("time",function(n,e){var r=t();e(r),i("send time "+new Date(r).toISOString())});var r=u();i("send config",r),e.send("config",r),n.emitter=e}),c.broadcast=function(t,n){i("broadcast",t,n),c.clients.forEach(function(e){e.emitter.send(t,n)})},c.broadcastConfig=function(){c.broadcast("config",u())},c.destroy=function(){c.close(),i("destroyed")},i("listening at ws://localhost:"+e),c}},function(t,n,e){t.exports="undefined"==typeof window||"undefined"==typeof window.WebSocket?e(21):window.WebSocket},function(n,e){n.exports=t},function(t,n,e){var r=e(2),o=e(23),i=e(33)("hypertimer:socket"),u=6e4;t.exports=function(t){function n(n,e){var r={event:n,data:e};i("send",r),t.send(JSON.stringify(r))}function e(n,e){return new o(function(r,o){var f=c(),s={event:n,id:f,data:e};a[f]={resolve:r,reject:o,timeout:setTimeout(function(){delete a[f],o(new Error("Timeout"))},u)},i("request",s),t.send(JSON.stringify(s))})["catch"](function(t){console.log("ERROR",t)})}function c(){return s++}var f=r({socket:t,send:n,request:e});t.onmessage=function(n){var e=n.data,r=JSON.parse(e);i("receive",r);var o=a[r.id];o?(clearTimeout(o.timeout),delete a[r.id],o.resolve(r.data)):"id"in r?f.emit(r.event,r.data,function(n){var e={id:r.id,data:n};t.readyState===t.OPEN||t.readyState===t.CONNECTING?(i("reply",e),t.send(JSON.stringify(e))):i("cancel reply",e,"(socket is closed)")}):f.emit(r.event,r.data)};var a={},s=0;return f}},function(t,n,e){t.exports="undefined"==typeof window||"undefined"==typeof window.Promise?e(24):window.Promise},function(t,n,e){"use strict";t.exports=e(25)},function(t,n,e){"use strict";t.exports=e(26),e(28),e(29),e(30),e(31)},function(t,n,e){"use strict";function r(){}function o(t){try{return t.then}catch(n){return m=n,y}}function i(t,n){try{return t(n)}catch(e){return m=e,y}}function u(t,n,e){try{t(n,e)}catch(r){return m=r,y}}function c(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._37=0,this._12=null,this._59=[],t!==r&&d(t,this)}function f(t,n,e){return new t.constructor(function(o,i){var u=new c(r);u.then(o,i),a(t,new h(n,e,u))})}function a(t,n){for(;3===t._37;)t=t._12;return 0===t._37?void t._59.push(n):void v(function(){var e=1===t._37?n.onFulfilled:n.onRejected;if(null===e)return void(1===t._37?s(n.promise,t._12):l(n.promise,t._12));var r=i(e,t._12);r===y?l(n.promise,m):s(n.promise,r)})}function s(t,n){if(n===t)return l(t,new TypeError("A promise cannot be resolved with itself."));if(n&&("object"==typeof n||"function"==typeof n)){var e=o(n);if(e===y)return l(t,m);if(e===t.then&&n instanceof c)return t._37=3,t._12=n,void p(t);if("function"==typeof e)return void d(e.bind(n),t)}t._37=1,t._12=n,p(t)}function l(t,n){t._37=2,t._12=n,p(t)}function p(t){for(var n=0;n<t._59.length;n++)a(t,t._59[n]);t._59=null}function h(t,n,e){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof n?n:null,this.promise=e}function d(t,n){var e=!1,r=u(t,function(t){e||(e=!0,s(n,t))},function(t){e||(e=!0,l(n,t))});e||r!==y||(e=!0,l(n,m))}var v=e(27),m=null,y={};t.exports=c,c._99=r,c.prototype.then=function(t,n){if(this.constructor!==c)return f(this,t,n);var e=new c(r);return a(this,new h(t,n,e)),e}},function(t,n){(function(n){"use strict";function e(t){c.length||(u(),f=!0),c[c.length]=t}function r(){for(;a<c.length;){var t=a;if(a+=1,c[t].call(),a>s){for(var n=0,e=c.length-a;e>n;n++)c[n]=c[n+a];c.length-=a,a=0}}c.length=0,a=0,f=!1}function o(t){var n=1,e=new l(t),r=document.createTextNode("");return e.observe(r,{characterData:!0}),function(){n=-n,r.data=n}}function i(t){return function(){function n(){clearTimeout(e),clearInterval(r),t()}var e=setTimeout(n,0),r=setInterval(n,50)}}t.exports=e;var u,c=[],f=!1,a=0,s=1024,l=n.MutationObserver||n.WebKitMutationObserver;u="function"==typeof l?o(r):i(r),e.requestFlush=u,e.makeRequestCallFromTimer=i}).call(n,function(){return this}())},function(t,n,e){"use strict";var r=e(26);t.exports=r,r.prototype.done=function(t,n){var e=arguments.length?this.then.apply(this,arguments):this;e.then(null,function(t){setTimeout(function(){throw t},0)})}},function(t,n,e){"use strict";var r=e(26);t.exports=r,r.prototype["finally"]=function(t){return this.then(function(n){return r.resolve(t()).then(function(){return n})},function(n){return r.resolve(t()).then(function(){throw n})})}},function(t,n,e){"use strict";function r(t){var n=new o(o._99);return n._37=1,n._12=t,n}var o=e(26);t.exports=o;var i=r(!0),u=r(!1),c=r(null),f=r(void 0),a=r(0),s=r("");o.resolve=function(t){if(t instanceof o)return t;if(null===t)return c;if(void 0===t)return f;if(t===!0)return i;if(t===!1)return u;if(0===t)return a;if(""===t)return s;if("object"==typeof t||"function"==typeof t)try{var n=t.then;if("function"==typeof n)return new o(n.bind(t))}catch(e){return new o(function(t,n){n(e)})}return r(t)},o.all=function(t){var n=Array.prototype.slice.call(t);return new o(function(t,e){function r(u,c){if(c&&("object"==typeof c||"function"==typeof c)){if(c instanceof o&&c.then===o.prototype.then){for(;3===c._37;)c=c._12;return 1===c._37?r(u,c._12):(2===c._37&&e(c._12),void c.then(function(t){r(u,t)},e))}var f=c.then;if("function"==typeof f){var a=new o(f.bind(c));return void a.then(function(t){r(u,t)},e)}}n[u]=c,0===--i&&t(n)}if(0===n.length)return t([]);for(var i=n.length,u=0;u<n.length;u++)r(u,n[u])})},o.reject=function(t){return new o(function(n,e){e(t)})},o.race=function(t){return new o(function(n,e){t.forEach(function(t){o.resolve(t).then(n,e)})})},o.prototype["catch"]=function(t){return this.then(null,t)}},function(t,n,e){"use strict";var r=e(26),o=e(32);t.exports=r,r.denodeify=function(t,n){return n=n||1/0,function(){var e=this,o=Array.prototype.slice.call(arguments,0,n>0?n:0);return new r(function(n,r){o.push(function(t,e){t?r(t):n(e)});var i=t.apply(e,o);!i||"object"!=typeof i&&"function"!=typeof i||"function"!=typeof i.then||n(i)})}},r.nodeify=function(t){return function(){var n=Array.prototype.slice.call(arguments),e="function"==typeof n[n.length-1]?n.pop():null,i=this;try{return t.apply(this,arguments).nodeify(e,i)}catch(u){if(null===e||"undefined"==typeof e)return new r(function(t,n){n(u)});o(function(){e.call(i,u)})}}},r.prototype.nodeify=function(t,n){return"function"!=typeof t?this:void this.then(function(e){o(function(){t.call(n,null,e)})},function(e){o(function(){t.call(n,e)})})}},function(t,n,e){"use strict";function r(){if(f.length)throw f.shift()}function o(t){var n;n=c.length?c.pop():new i,n.task=t,u(n)}function i(){this.task=null}var u=e(27),c=[],f=[],a=u.makeRequestCallFromTimer(r);t.exports=o,i.prototype.call=function(){try{this.task.call()}catch(t){o.onerror?o.onerror(t):(f.push(t),a())}finally{this.task=null,c[c.length]=this}}},function(t,n,e){var r="undefined"!=typeof window?window.Debug:e(34);t.exports=r||function(){return function(){}}},function(t,e){t.exports=n},function(t,n,e){var r=e(20),o=e(23),i=e(33)("hypertimer:slave"),u=e(22),c=e(36),f=e(37),a=36e5,s=1e3,l=5;n.createSlave=function(t){function n(){function t(){var t=null;return v?o.resolve(t):e(h).then(function(n){t=n})["catch"](function(t){console.log(t)}).then(function(){return f.wait(s)}).then(function(){return t})}return f.repeat(t,l).then(function(t){i("latencies",t);var n=t.filter(function(t){return null!==t}),e=c.median(n)+c.std(n),r=n.filter(function(t){return e>t});return r.length>0?c.mean(r):null}).then(function(t){return v?o.resolve(null):h.request("time").then(function(n){var e=n+t;return h.emit("change",e),e})})["catch"](function(t){h.emit("error",t)})}function e(t){var n=Date.now();return t.request("time").then(function(e){var r=Date.now(),o=(r-n)/2,i=e+o;return d&&(d=!1,t.emit("change",i)),o})}var p=new r(t),h=u(p),d=!0,v=!1,m=null;return p.onopen=function(){i("connected"),n(),m=setInterval(n,a)},h.destroy=function(){v=!0,clearInterval(m),m=null,p.close(),i("destroyed")},h}},function(t,n){n.compare=function(t,n){return t>n?1:n>t?-1:0},n.add=function(t,n){return t+n},n.sum=function(t){return t.reduce(n.add)},n.mean=function(t){return n.sum(t)/t.length},n.std=function(t){return Math.sqrt(n.variance(t))},n.variance=function(t){if(t.length<2)return 0;var e=n.mean(t);return t.map(function(t){return Math.pow(t-e,2)}).reduce(n.add)/(t.length-1)},n.median=function(t){if(t.length<2)return t[0];var e=t.slice().sort(n.compare);return e.length%2===0?(t[t.length/2-1]+t[t.length/2])/2:t[(t.length-1)/2]}},function(t,n,e){var r=e(23);n.wait=function(t){return new r(function(n){setTimeout(n,t)})},n.repeat=function(t,n){return new r(function(e,r){function o(){n>i?(i++,t().then(function(t){u.push(t),o()})):e(u)}var i=0,u=[];o()})},n.whilst=function(t,n){return new r(function(e,r){function o(){t()?n().then(function(){o()}):e()}o()})}},function(t,n){"function"==typeof Date.now?n.systemNow=function(){return Date.now()}:n.systemNow=function(){return(new Date).valueOf()},n.shuffle=function(t){for(var n,e,r=t.length;r;n=Math.floor(Math.random()*r),e=t[--r],t[r]=t[n],t[n]=e);return t}}])}); | ||
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("ws"),require("debug")):"function"==typeof define&&define.amd?define(["ws","debug"],n):"object"==typeof exports?exports.hypertimer=n(require("ws"),require("debug")):t.hypertimer=n(t.ws,t.debug)}(this,function(t,n){return function(t){function n(r){if(e[r])return e[r].exports;var o=e[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var e={};return n.m=t,n.c=e,n.p="",n(0)}([function(t,n,e){t.exports=e(1)},function(t,n,e){function r(t){function n(){return{paced:y,rate:g,deterministic:w,time:_,master:b,port:x}}function e(t){if(I||t.master)for(var n in t)if("master"!==n&&"slave"!==n)throw new Error('Cannot apply configuration option "'+n+'", timer is configured as slave.')}function r(t){function e(t){var e=n();r(t);var o=n();P.emit("config",o,e)}if("deterministic"in t&&(w=t.deterministic?!0:!1),"paced"in t&&(y=t.paced?!0:!1),"time"in t&&(T=m(t.time),O=f.systemNow(),s(T),_=new Date(T).toISOString()),"rate"in t){var o=Number(t.rate);if(isNaN(o)||0>=o)throw new TypeError("Invalid rate "+JSON.stringify(t.rate)+". Rate must be a positive number");T=P.now(),O=f.systemNow(),g=o}"master"in t&&(I&&(I.destroy(),I=null),b=t.master,null!=t.master&&(I=c(t.master),I.on("change",function(t){e({time:t})}),I.on("config",function(t){e(t)}),I.on("error",function(t){P.emit("error",t)}))),"port"in t&&(R&&(R.destroy(),R=null),x=t.port,t.port&&(R=u(P.now,P.config,t.port),R.on("error",function(t){P.emit("error",t)}))),d(),R&&R.broadcastConfig()}function s(t){for(var n=0;n<N.length;n++){var e=N[n];e.type===a.INTERVAL&&l(e,t)}}function l(t,n){t.occurrence=Math.round((n-t.firstTime)/t.interval),t.time=t.firstTime+t.occurrence*t.interval}function p(t){if(N.length>0){for(var n=N.length-1;n>=0&&N[n].time>t.time;)n--;N.splice(n+1,0,t)}else N.push(t)}function h(t,n){function e(){t.type===a.INTERVAL&&E[t.id]&&(t.occurrence++,t.time=t.firstTime+t.occurrence*t.interval,p(t)),delete E[t.id],n&&n()}E[t.id]=t;try{0==t.callback.length?(t.callback(),e()):t.callback(e)}catch(r){i(P,"error")?P.emit("error",r):console.log("Error",r),e()}}function v(t){for(var n=0;n<N.length&&(N[n].time<=t||!isFinite(N[n].time));)n++;var e=N.splice(0,n);return 0==w&&f.shuffle(e),e}function d(){function t(){function t(){var e=n.shift();e?h(e,t):d()}y||(T=e>T&&isFinite(e)?e:T);var n=v(e);y?(n.forEach(function(t){h(t)}),d()):t()}if(y||!(Object.keys(E).length>0)){var n=N[0];if(S&&(clearTimeout(S),S=null),j&&n){var e=n.time,r=e-P.now(),o=y?r/g:0;S=setTimeout(t,Math.round(o))}}}function m(t){var n="number"==typeof t?t:t instanceof Date?t.valueOf():new Date(t).valueOf();if(isNaN(n))throw new TypeError("Invalid date "+JSON.stringify(t)+". Date, number, or ISOString expected");return n}var y=!0,g=1,w=!0,_=null,b=null,x=null,j=!1,O=null,T=f.systemNow(),N=[],E={},S=null,k=0,R=null,I=null,P=o({});return P.config=function(t){return t&&(e(t),r(t)),n()},P.now=function(){if(y){if(j){var t=f.systemNow()-O,n=t*g;return T+n}return T}return T},P["continue"]=function(){O=f.systemNow(),j=!0,d()},P.pause=function(){T=P.now(),O=null,j=!1,d()},P.getTime=function(){return new Date(P.now())},P.valueOf=P.getTime,P.toString=function(){return P.getTime().toString()},P.setTimeout=function(t,n){var e=k++,r=P.now()+n;if(isNaN(r))throw new TypeError("delay must be a number");return p({id:e,type:a.TIMEOUT,time:r,callback:t}),d(),e},P.setTrigger=function(t,n){var e=k++,r=m(n);return p({id:e,type:a.TRIGGER,time:r,callback:t}),d(),e},P.setInterval=function(t,n,e){var r=k++,o=Number(n);if(isNaN(o))throw new TypeError("interval must be a number");(0>o||!isFinite(o))&&(o=0);var i=void 0!=e?m(e):null,u=P.now(),c=null!=i?i:u+o,f={id:r,type:a.INTERVAL,interval:o,time:c,firstTime:null!=i?i:c,occurrence:0,callback:t};return u>c&&l(f,u),p(f),d(),r},P.clearTimeout=function(t){if(E[t])return void delete E[t];for(var n=0;n<N.length;n++)if(N[n].id===t){N.splice(n,1),d();break}},P.clearTrigger=P.clearTimeout,P.clearInterval=P.clearTimeout,P.list=function(){return N.map(function(t){return t.id})},P.clear=function(){E={},N=[],d()},P.destroy=function(){P.clear(),I&&I.destroy(),R&&R.destroy()},Object.defineProperty(P,"running",{get:function(){return j}}),P.config(t),P["continue"](),P}var o=e(2),i=e(19),u=e(21).createMaster,c=e(38).createSlave,f=e(41),a={TIMEOUT:0,INTERVAL:1,TRIGGER:2};t.exports=r},function(t,n,e){"use strict";var r,o,i,u,c,f,a,s=e(3),l=e(18),p=Function.prototype.apply,h=Function.prototype.call,v=Object.create,d=Object.defineProperty,m=Object.defineProperties,y=Object.prototype.hasOwnProperty,g={configurable:!0,enumerable:!1,writable:!0};r=function(t,n){var e;return l(n),y.call(this,"__ee__")?e=this.__ee__:(e=g.value=v(null),d(this,"__ee__",g),g.value=null),e[t]?"object"==typeof e[t]?e[t].push(n):e[t]=[e[t],n]:e[t]=n,this},o=function(t,n){var e,o;return l(n),o=this,r.call(this,t,e=function(){i.call(o,t,e),p.call(n,this,arguments)}),e.__eeOnceListener__=n,this},i=function(t,n){var e,r,o,i;if(l(n),!y.call(this,"__ee__"))return this;if(e=this.__ee__,!e[t])return this;if(r=e[t],"object"==typeof r)for(i=0;o=r[i];++i)(o===n||o.__eeOnceListener__===n)&&(2===r.length?e[t]=r[i?0:1]:r.splice(i,1));else(r===n||r.__eeOnceListener__===n)&&delete e[t];return this},u=function(t){var n,e,r,o,i;if(y.call(this,"__ee__")&&(o=this.__ee__[t]))if("object"==typeof o){for(e=arguments.length,i=new Array(e-1),n=1;e>n;++n)i[n-1]=arguments[n];for(o=o.slice(),n=0;r=o[n];++n)p.call(r,this,i)}else switch(arguments.length){case 1:h.call(o,this);break;case 2:h.call(o,this,arguments[1]);break;case 3:h.call(o,this,arguments[1],arguments[2]);break;default:for(e=arguments.length,i=new Array(e-1),n=1;e>n;++n)i[n-1]=arguments[n];p.call(o,this,i)}},c={on:r,once:o,off:i,emit:u},f={on:s(r),once:s(o),off:s(i),emit:s(u)},a=m({},f),t.exports=n=function(t){return null==t?v(a):m(Object(t),f)},n.methods=c},function(t,n,e){"use strict";var r,o=e(4),i=e(13),u=e(14),c=e(15);r=t.exports=function(t,n){var e,r,u,f,a;return arguments.length<2||"string"!=typeof t?(f=n,n=t,t=null):f=arguments[2],null==t?(e=u=!0,r=!1):(e=c.call(t,"c"),r=c.call(t,"e"),u=c.call(t,"w")),a={value:n,configurable:e,enumerable:r,writable:u},f?o(i(f),a):a},r.gs=function(t,n,e){var r,f,a,s;return"string"!=typeof t?(a=e,e=n,n=t,t=null):a=arguments[3],null==n?n=void 0:u(n)?null==e?e=void 0:u(e)||(a=e,e=void 0):(a=n,n=e=void 0),null==t?(r=!0,f=!1):(r=c.call(t,"c"),f=c.call(t,"e")),s={get:n,set:e,configurable:r,enumerable:f},a?o(i(a),s):s}},function(t,n,e){"use strict";t.exports=e(5)()?Object.assign:e(6)},function(t,n){"use strict";t.exports=function(){var t,n=Object.assign;return"function"!=typeof n?!1:(t={foo:"raz"},n(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},function(t,n,e){"use strict";var r=e(7),o=e(12),i=Math.max;t.exports=function(t,n){var e,u,c,f=i(arguments.length,2);for(t=Object(o(t)),c=function(r){try{t[r]=n[r]}catch(o){e||(e=o)}},u=1;f>u;++u)n=arguments[u],r(n).forEach(c);if(void 0!==e)throw e;return t}},function(t,n,e){"use strict";t.exports=e(8)()?Object.keys:e(9)},function(t,n){"use strict";t.exports=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}},function(t,n,e){"use strict";var r=e(10),o=Object.keys;t.exports=function(t){return o(r(t)?Object(t):t)}},function(t,n,e){"use strict";var r=e(11)();t.exports=function(t){return t!==r&&null!==t}},function(t,n){"use strict";t.exports=function(){}},function(t,n,e){"use strict";var r=e(10);t.exports=function(t){if(!r(t))throw new TypeError("Cannot use null or undefined");return t}},function(t,n,e){"use strict";var r=e(10),o=Array.prototype.forEach,i=Object.create,u=function(t,n){var e;for(e in t)n[e]=t[e]};t.exports=function(t){var n=i(null);return o.call(arguments,function(t){r(t)&&u(Object(t),n)}),n}},function(t,n){"use strict";t.exports=function(t){return"function"==typeof t}},function(t,n,e){"use strict";t.exports=e(16)()?String.prototype.contains:e(17)},function(t,n){"use strict";var e="razdwatrzy";t.exports=function(){return"function"!=typeof e.contains?!1:e.contains("dwa")===!0&&e.contains("foo")===!1}},function(t,n){"use strict";var e=String.prototype.indexOf;t.exports=function(t){return e.call(this,t,arguments[1])>-1}},function(t,n){"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},function(t,n,e){"use strict";var r=e(20),o=e(12),i=Object.prototype.hasOwnProperty;t.exports=function(t){var n;return o(t),n=arguments[1],arguments.length>1?i.call(t,"__ee__")&&Boolean(t.__ee__[n]):t.hasOwnProperty("__ee__")&&!r(t.__ee__)}},function(t,n,e){"use strict";var r=e(12),o=Object.prototype.propertyIsEnumerable;t.exports=function(t){var n;r(t);for(n in t)if(o.call(t,n))return!1;return!0}},function(t,n,e){var r=e(22),o=e(24),i=e(36)("hypertimer:master");n.createMaster=function(t,n,e){function u(){var t=n();return delete t.time,delete t.master,delete t.port,t}var c=new r.Server({port:e});return c.on("connection",function(n){i("new connection");var e=o(n);e.on("time",function(n,e){var r=t();e(r),i("send time "+new Date(r).toISOString())});var r=u();i("send config",r),e.send("config",r),n.emitter=e}),c.broadcast=function(t,n){i("broadcast",t,n),c.clients.forEach(function(e){e.emitter.send(t,n)})},c.broadcastConfig=function(){c.broadcast("config",u())},c.destroy=function(){c.close(),i("destroyed")},i("listening at ws://localhost:"+e),c}},function(t,n,e){t.exports="undefined"==typeof window||"undefined"==typeof window.WebSocket?e(23):window.WebSocket},function(n,e){n.exports=t},function(t,n,e){var r=e(2),o=e(25),i=e(36)("hypertimer:socket"),u=6e4;t.exports=function(t){function n(n,e){var r={event:n,data:e};i("send",r),t.send(JSON.stringify(r))}function e(n,e){return new o(function(r,o){var f=c(),s={event:n,id:f,data:e};a[f]={resolve:r,reject:o,timeout:setTimeout(function(){delete a[f],o(new Error("Timeout"))},u)},i("request",s),t.send(JSON.stringify(s))})["catch"](function(t){console.log("ERROR",t)})}function c(){return s++}var f=r({socket:t,send:n,request:e});t.onmessage=function(n){var e=n.data,r=JSON.parse(e);i("receive",r);var o=a[r.id];o?(clearTimeout(o.timeout),delete a[r.id],o.resolve(r.data)):"id"in r?f.emit(r.event,r.data,function(n){var e={id:r.id,data:n};t.readyState===t.OPEN||t.readyState===t.CONNECTING?(i("reply",e),t.send(JSON.stringify(e))):i("cancel reply",e,"(socket is closed)")}):f.emit(r.event,r.data)};var a={},s=0;return f}},function(t,n,e){t.exports="undefined"==typeof window||"undefined"==typeof window.Promise?e(26):window.Promise},function(t,n,e){"use strict";t.exports=e(27)},function(t,n,e){"use strict";t.exports=e(28),e(30),e(31),e(32),e(33),e(35)},function(t,n,e){"use strict";function r(){}function o(t){try{return t.then}catch(n){return y=n,g}}function i(t,n){try{return t(n)}catch(e){return y=e,g}}function u(t,n,e){try{t(n,e)}catch(r){return y=r,g}}function c(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("Promise constructor's argument is not a function");this._75=0,this._83=0,this._18=null,this._38=null,t!==r&&d(t,this)}function f(t,n,e){return new t.constructor(function(o,i){var u=new c(r);u.then(o,i),a(t,new v(n,e,u))})}function a(t,n){for(;3===t._83;)t=t._18;return c._47&&c._47(t),0===t._83?0===t._75?(t._75=1,void(t._38=n)):1===t._75?(t._75=2,void(t._38=[t._38,n])):void t._38.push(n):void s(t,n)}function s(t,n){m(function(){var e=1===t._83?n.onFulfilled:n.onRejected;if(null===e)return void(1===t._83?l(n.promise,t._18):p(n.promise,t._18));var r=i(e,t._18);r===g?p(n.promise,y):l(n.promise,r)})}function l(t,n){if(n===t)return p(t,new TypeError("A promise cannot be resolved with itself."));if(n&&("object"==typeof n||"function"==typeof n)){var e=o(n);if(e===g)return p(t,y);if(e===t.then&&n instanceof c)return t._83=3,t._18=n,void h(t);if("function"==typeof e)return void d(e.bind(n),t)}t._83=1,t._18=n,h(t)}function p(t,n){t._83=2,t._18=n,c._71&&c._71(t,n),h(t)}function h(t){if(1===t._75&&(a(t,t._38),t._38=null),2===t._75){for(var n=0;n<t._38.length;n++)a(t,t._38[n]);t._38=null}}function v(t,n,e){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof n?n:null,this.promise=e}function d(t,n){var e=!1,r=u(t,function(t){e||(e=!0,l(n,t))},function(t){e||(e=!0,p(n,t))});e||r!==g||(e=!0,p(n,y))}var m=e(29),y=null,g={};t.exports=c,c._47=null,c._71=null,c._44=r,c.prototype.then=function(t,n){if(this.constructor!==c)return f(this,t,n);var e=new c(r);return a(this,new v(t,n,e)),e}},function(t,n){(function(n){"use strict";function e(t){c.length||(u(),f=!0),c[c.length]=t}function r(){for(;a<c.length;){var t=a;if(a+=1,c[t].call(),a>s){for(var n=0,e=c.length-a;e>n;n++)c[n]=c[n+a];c.length-=a,a=0}}c.length=0,a=0,f=!1}function o(t){var n=1,e=new p(t),r=document.createTextNode("");return e.observe(r,{characterData:!0}),function(){n=-n,r.data=n}}function i(t){return function(){function n(){clearTimeout(e),clearInterval(r),t()}var e=setTimeout(n,0),r=setInterval(n,50)}}t.exports=e;var u,c=[],f=!1,a=0,s=1024,l="undefined"!=typeof n?n:self,p=l.MutationObserver||l.WebKitMutationObserver;u="function"==typeof p?o(r):i(r),e.requestFlush=u,e.makeRequestCallFromTimer=i}).call(n,function(){return this}())},function(t,n,e){"use strict";var r=e(28);t.exports=r,r.prototype.done=function(t,n){var e=arguments.length?this.then.apply(this,arguments):this;e.then(null,function(t){setTimeout(function(){throw t},0)})}},function(t,n,e){"use strict";var r=e(28);t.exports=r,r.prototype["finally"]=function(t){return this.then(function(n){return r.resolve(t()).then(function(){return n})},function(n){return r.resolve(t()).then(function(){throw n})})}},function(t,n,e){"use strict";function r(t){var n=new o(o._44);return n._83=1,n._18=t,n}var o=e(28);t.exports=o;var i=r(!0),u=r(!1),c=r(null),f=r(void 0),a=r(0),s=r("");o.resolve=function(t){if(t instanceof o)return t;if(null===t)return c;if(void 0===t)return f;if(t===!0)return i;if(t===!1)return u;if(0===t)return a;if(""===t)return s;if("object"==typeof t||"function"==typeof t)try{var n=t.then;if("function"==typeof n)return new o(n.bind(t))}catch(e){return new o(function(t,n){n(e)})}return r(t)},o.all=function(t){var n=Array.prototype.slice.call(t);return new o(function(t,e){function r(u,c){if(c&&("object"==typeof c||"function"==typeof c)){if(c instanceof o&&c.then===o.prototype.then){for(;3===c._83;)c=c._18;return 1===c._83?r(u,c._18):(2===c._83&&e(c._18),void c.then(function(t){r(u,t)},e))}var f=c.then;if("function"==typeof f){var a=new o(f.bind(c));return void a.then(function(t){r(u,t)},e)}}n[u]=c,0===--i&&t(n)}if(0===n.length)return t([]);for(var i=n.length,u=0;u<n.length;u++)r(u,n[u])})},o.reject=function(t){return new o(function(n,e){e(t)})},o.race=function(t){return new o(function(n,e){t.forEach(function(t){o.resolve(t).then(n,e)})})},o.prototype["catch"]=function(t){return this.then(null,t)}},function(t,n,e){"use strict";function r(t,n){for(var e=[],r=0;n>r;r++)e.push("a"+r);var o=["return function ("+e.join(",")+") {","var self = this;","return new Promise(function (rs, rj) {","var res = fn.call(",["self"].concat(e).concat([c]).join(","),");","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],o)(i,t)}function o(t){for(var n=Math.max(t.length-1,3),e=[],r=0;n>r;r++)e.push("a"+r);var o=["return function ("+e.join(",")+") {","var self = this;","var args;","var argLength = arguments.length;","if (arguments.length > "+n+") {","args = new Array(arguments.length + 1);","for (var i = 0; i < arguments.length; i++) {","args[i] = arguments[i];","}","}","return new Promise(function (rs, rj) {","var cb = "+c+";","var res;","switch (argLength) {",e.concat(["extra"]).map(function(t,n){return"case "+n+":res = fn.call("+["self"].concat(e.slice(0,n)).concat("cb").join(",")+");break;"}).join(""),"default:","args[argLength] = cb;","res = fn.apply(self, args);","}","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],o)(i,t)}var i=e(28),u=e(34);t.exports=i,i.denodeify=function(t,n){return"number"==typeof n&&n!==1/0?r(t,n):o(t)};var c="function (err, res) {if (err) { rj(err); } else { rs(res); }}";i.nodeify=function(t){return function(){var n=Array.prototype.slice.call(arguments),e="function"==typeof n[n.length-1]?n.pop():null,r=this;try{return t.apply(this,arguments).nodeify(e,r)}catch(o){if(null===e||"undefined"==typeof e)return new i(function(t,n){n(o)});u(function(){e.call(r,o)})}}},i.prototype.nodeify=function(t,n){return"function"!=typeof t?this:void this.then(function(e){u(function(){t.call(n,null,e)})},function(e){u(function(){t.call(n,e)})})}},function(t,n,e){"use strict";function r(){if(f.length)throw f.shift()}function o(t){var n;n=c.length?c.pop():new i,n.task=t,u(n)}function i(){this.task=null}var u=e(29),c=[],f=[],a=u.makeRequestCallFromTimer(r);t.exports=o,i.prototype.call=function(){try{this.task.call()}catch(t){o.onerror?o.onerror(t):(f.push(t),a())}finally{this.task=null,c[c.length]=this}}},function(t,n,e){"use strict";var r=e(28);t.exports=r,r.enableSynchronous=function(){r.prototype.isPending=function(){return 0==this.getState()},r.prototype.isFulfilled=function(){return 1==this.getState()},r.prototype.isRejected=function(){return 2==this.getState()},r.prototype.getValue=function(){if(3===this._83)return this._18.getValue();if(!this.isFulfilled())throw new Error("Cannot get a value of an unfulfilled promise.");return this._18},r.prototype.getReason=function(){if(3===this._83)return this._18.getReason();if(!this.isRejected())throw new Error("Cannot get a rejection reason of a non-rejected promise.");return this._18},r.prototype.getState=function(){return 3===this._83?this._18.getState():-1===this._83||-2===this._83?0:this._83}},r.disableSynchronous=function(){r.prototype.isPending=void 0,r.prototype.isFulfilled=void 0,r.prototype.isRejected=void 0,r.prototype.getValue=void 0,r.prototype.getReason=void 0,r.prototype.getState=void 0}},function(t,n,e){var r="undefined"!=typeof window?window.Debug:e(37);t.exports=r||function(){return function(){}}},function(t,e){t.exports=n},function(t,n,e){var r=e(22),o=e(25),i=e(36)("hypertimer:slave"),u=e(24),c=e(39),f=e(40),a=36e5,s=1e3,l=5;n.createSlave=function(t){function n(){function t(){var t=null;return d?o.resolve(t):e(h).then(function(n){t=n})["catch"](function(t){console.log(t)}).then(function(){return f.wait(s)}).then(function(){return t})}return f.repeat(t,l).then(function(t){i("latencies",t);var n=t.filter(function(t){return null!==t}),e=c.median(n)+c.std(n),r=n.filter(function(t){return e>t});return r.length>0?c.mean(r):null}).then(function(t){return d?o.resolve(null):h.request("time").then(function(n){var e=n+t;return h.emit("change",e),e})})["catch"](function(t){h.emit("error",t)})}function e(t){var n=Date.now();return t.request("time").then(function(e){var r=Date.now(),o=(r-n)/2,i=e+o;return v&&(v=!1,t.emit("change",i)),o})}var p=new r(t),h=u(p),v=!0,d=!1,m=null;return p.onopen=function(){i("connected"),n(),m=setInterval(n,a)},h.destroy=function(){d=!0,clearInterval(m),m=null,p.close(),i("destroyed")},h}},function(t,n){n.compare=function(t,n){return t>n?1:n>t?-1:0},n.add=function(t,n){return t+n},n.sum=function(t){return t.reduce(n.add)},n.mean=function(t){return n.sum(t)/t.length},n.std=function(t){return Math.sqrt(n.variance(t))},n.variance=function(t){if(t.length<2)return 0;var e=n.mean(t);return t.map(function(t){return Math.pow(t-e,2)}).reduce(n.add)/(t.length-1)},n.median=function(t){if(t.length<2)return t[0];var e=t.slice().sort(n.compare);return e.length%2===0?(t[t.length/2-1]+t[t.length/2])/2:t[(t.length-1)/2]}},function(t,n,e){var r=e(25);n.wait=function(t){return new r(function(n){setTimeout(n,t)})},n.repeat=function(t,n){return new r(function(e,r){function o(){n>i?(i++,t().then(function(t){u.push(t),o()})):e(u)}var i=0,u=[];o()})},n.whilst=function(t,n){return new r(function(e,r){function o(){t()?n().then(function(){o()}):e()}o()})}},function(t,n){"function"==typeof Date.now?n.systemNow=function(){return Date.now()}:n.systemNow=function(){return(new Date).valueOf()},n.shuffle=function(t){for(var n,e,r=t.length;r;n=Math.floor(Math.random()*r),e=t[--r],t[r]=t[n],t[n]=e);return t}}])}); | ||
//# sourceMappingURL=hypertimer.map |
# History | ||
## 2018-01-24, version 3.0.0 | ||
- Upgraded dependencies to the latest version, notably `ws` and `debug`. | ||
## 2015-12-08, version 2.1.3 | ||
@@ -5,0 +10,0 @@ |
{ | ||
"name": "hypertimer", | ||
"version": "2.1.3", | ||
"version": "3.0.0", | ||
"description": "Time control for simulations", | ||
@@ -22,8 +22,8 @@ "author": "Jos de Jong <wjosdejong@gmail.com> (https://github.com/josdejong)", | ||
"dependencies": { | ||
"body-parser": "1.14.1", | ||
"debug": "2.2.0", | ||
"event-emitter": "0.3.4", | ||
"node-uuid": "1.4.7", | ||
"promise": "7.0.4", | ||
"ws": "0.8.1" | ||
"body-parser": "1.18.2", | ||
"debug": "3.1.0", | ||
"event-emitter": "0.3.5", | ||
"node-uuid": "1.4.8", | ||
"promise": "8.0.1", | ||
"ws": "4.0.0" | ||
}, | ||
@@ -30,0 +30,0 @@ "devDependencies": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
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
251150
4783
32
5
+ Addedasync-limiter@1.0.1(transitive)
+ Addedbody-parser@1.18.2(transitive)
+ Addedbytes@3.0.0(transitive)
+ Addeddebug@2.6.93.1.0(transitive)
+ Addeddepd@1.1.1(transitive)
+ Addedhttp-errors@1.6.21.6.3(transitive)
+ Addediconv-lite@0.4.19(transitive)
+ Addedinherits@2.0.3(transitive)
+ Addedms@2.0.0(transitive)
+ Addednode-uuid@1.4.8(transitive)
+ Addedpromise@8.0.1(transitive)
+ Addedqs@6.5.1(transitive)
+ Addedraw-body@2.3.2(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedsetprototypeof@1.0.31.1.0(transitive)
+ Addedultron@1.1.1(transitive)
+ Addedws@4.0.0(transitive)
- Removedbindings@1.2.1(transitive)
- Removedbody-parser@1.14.1(transitive)
- Removedbufferutil@1.2.1(transitive)
- Removedbytes@2.1.02.4.0(transitive)
- Removedd@0.1.1(transitive)
- Removeddebug@2.2.0(transitive)
- Removedevent-emitter@0.3.4(transitive)
- Removedhttp-errors@1.3.1(transitive)
- Removediconv-lite@0.4.120.4.13(transitive)
- Removedinherits@2.0.4(transitive)
- Removedms@0.7.1(transitive)
- Removednan@2.22.02.4.0(transitive)
- Removednode-uuid@1.4.7(transitive)
- Removedoptions@0.0.6(transitive)
- Removedpromise@7.0.4(transitive)
- Removedqs@5.1.0(transitive)
- Removedraw-body@2.1.7(transitive)
- Removedultron@1.0.2(transitive)
- Removedutf-8-validate@1.2.2(transitive)
- Removedws@0.8.1(transitive)
Updatedbody-parser@1.18.2
Updateddebug@3.1.0
Updatedevent-emitter@0.3.5
Updatednode-uuid@1.4.8
Updatedpromise@8.0.1
Updatedws@4.0.0