Socket
Socket
Sign inDemoInstall

basic-provider

Package Overview
Dependencies
1
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.5.0 to 1.6.0

4

dist/cjs/provider.d.ts

@@ -7,3 +7,3 @@ import EventEmitter from 'eventemitter3';

constructor(connection: IRpcConnection);
abstract enable(...opts: any | undefined): Promise<any>;
abstract enable<T>(...opts: any | undefined): Promise<T>;
set connected(value: boolean);

@@ -13,5 +13,5 @@ get connected(): boolean;

close(): Promise<void>;
send(method: string, params?: any): Promise<any>;
send<Result = any, Params = any>(method: string, params: Params): Promise<Result>;
}
export default BasicProvider;
//# sourceMappingURL=provider.d.ts.map

@@ -49,3 +49,3 @@ "use strict";

}
send(method, params = {}) {
send(method, params) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {

@@ -56,3 +56,3 @@ const result = yield this.connection.send({

method,
params,
params: params || {},
});

@@ -59,0 +59,0 @@ return result;

@@ -16,2 +16,2 @@ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("BasicProvider",[],e):"object"==typeof exports?exports.BasicProvider=e():t.BasicProvider=e()}(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=1)}([function(t,e,n){"use strict";n.r(e),n.d(e,"__extends",(function(){return o})),n.d(e,"__assign",(function(){return c})),n.d(e,"__rest",(function(){return i})),n.d(e,"__decorate",(function(){return u})),n.d(e,"__param",(function(){return f})),n.d(e,"__metadata",(function(){return a})),n.d(e,"__awaiter",(function(){return s})),n.d(e,"__generator",(function(){return l})),n.d(e,"__exportStar",(function(){return p})),n.d(e,"__values",(function(){return d})),n.d(e,"__read",(function(){return h})),n.d(e,"__spread",(function(){return y})),n.d(e,"__spreadArrays",(function(){return v})),n.d(e,"__await",(function(){return _})),n.d(e,"__asyncGenerator",(function(){return b})),n.d(e,"__asyncDelegator",(function(){return m})),n.d(e,"__asyncValues",(function(){return w})),n.d(e,"__makeTemplateObject",(function(){return O})),n.d(e,"__importStar",(function(){return x})),n.d(e,"__importDefault",(function(){return g}));

***************************************************************************** */
var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function o(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var c=function(){return(c=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function i(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}function u(t,e,n,r){var o,c=arguments.length,i=c<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(i=(c<3?o(i):c>3?o(e,n,i):o(e,n))||i);return c>3&&i&&Object.defineProperty(e,n,i),i}function f(t,e){return function(n,r){e(n,r,t)}}function a(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function s(t,e,n,r){return new(n||(n=Promise))((function(o,c){function i(t){try{f(r.next(t))}catch(t){c(t)}}function u(t){try{f(r.throw(t))}catch(t){c(t)}}function f(t){t.done?o(t.value):new n((function(e){e(t.value)})).then(i,u)}f((r=r.apply(t,e||[])).next())}))}function l(t,e){var n,r,o,c,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return c={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function u(c){return function(u){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=e.call(t,i)}catch(t){c=[6,t],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}function p(t,e){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}function d(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function h(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,c=n.call(t),i=[];try{for(;(void 0===e||e-- >0)&&!(r=c.next()).done;)i.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=c.return)&&n.call(c)}finally{if(o)throw o.error}}return i}function y(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(h(arguments[e]));return t}function v(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var c=arguments[e],i=0,u=c.length;i<u;i++,o++)r[o]=c[i];return r}function _(t){return this instanceof _?(this.v=t,this):new _(t)}function b(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(t,e||[]),c=[];return r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r;function i(t){o[t]&&(r[t]=function(e){return new Promise((function(n,r){c.push([t,e,n,r])>1||u(t,e)}))})}function u(t,e){try{(n=o[t](e)).value instanceof _?Promise.resolve(n.value.v).then(f,a):s(c[0][2],n)}catch(t){s(c[0][3],t)}var n}function f(t){u("next",t)}function a(t){u("throw",t)}function s(t,e){t(e),c.shift(),c.length&&u(c[0][0],c[0][1])}}function m(t){var e,n;return e={},r("next"),r("throw",(function(t){throw t})),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,o){e[r]=t[r]?function(e){return(n=!n)?{value:_(t[r](e)),done:"return"===r}:o?o(e):e}:o}}function w(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=d(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,o){(function(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)})(r,o,(e=t[n](e)).done,e.value)}))}}}function O(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function x(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function g(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(0).__importDefault(n(2));e.default=r.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(0),o=r.__importDefault(n(3)),c=n(4);class i extends o.default{constructor(t){super(),this._connected=!1,this.connection=t,this.connection.connected&&(this.connected=!0)}set connected(t){this._connected=t,!0===t?(this.emit("open"),this.emit("connect")):(this.emit("close"),this.emit("disconnect"))}get connected(){return this._connected}open(){return this.connected?Promise.resolve():new Promise((t,e)=>{this.connection.on("disconnect",()=>{this.connected=!1,e()}),this.connection.on("connect",()=>{this.connected=!0,t()}),this.connection.open()})}close(){return this.connected=!1,this.connection.close()}send(t,e={}){return r.__awaiter(this,void 0,void 0,(function*(){return yield this.connection.send({id:c.payloadId(),jsonrpc:"2.0",method:t,params:e})}))}}e.default=i},function(t,e,n){"use strict";var r=Object.prototype.hasOwnProperty,o="~";function c(){}function i(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function u(t,e,n,r,c){if("function"!=typeof n)throw new TypeError("The listener must be a function");var u=new i(n,r||t,c),f=o?o+e:e;return t._events[f]?t._events[f].fn?t._events[f]=[t._events[f],u]:t._events[f].push(u):(t._events[f]=u,t._eventsCount++),t}function f(t,e){0==--t._eventsCount?t._events=new c:delete t._events[e]}function a(){this._events=new c,this._eventsCount=0}Object.create&&(c.prototype=Object.create(null),(new c).__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,c=n.length,i=new Array(c);r<c;r++)i[r]=n[r].fn;return i},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,c,i){var u=o?o+t:t;if(!this._events[u])return!1;var f,a,s=this._events[u],l=arguments.length;if(s.fn){switch(s.once&&this.removeListener(t,s.fn,void 0,!0),l){case 1:return s.fn.call(s.context),!0;case 2:return s.fn.call(s.context,e),!0;case 3:return s.fn.call(s.context,e,n),!0;case 4:return s.fn.call(s.context,e,n,r),!0;case 5:return s.fn.call(s.context,e,n,r,c),!0;case 6:return s.fn.call(s.context,e,n,r,c,i),!0}for(a=1,f=new Array(l-1);a<l;a++)f[a-1]=arguments[a];s.fn.apply(s.context,f)}else{var p,d=s.length;for(a=0;a<d;a++)switch(s[a].once&&this.removeListener(t,s[a].fn,void 0,!0),l){case 1:s[a].fn.call(s[a].context);break;case 2:s[a].fn.call(s[a].context,e);break;case 3:s[a].fn.call(s[a].context,e,n);break;case 4:s[a].fn.call(s[a].context,e,n,r);break;default:if(!f)for(p=1,f=new Array(l-1);p<l;p++)f[p-1]=arguments[p];s[a].fn.apply(s[a].context,f)}}return!0},a.prototype.on=function(t,e,n){return u(this,t,e,n,!1)},a.prototype.once=function(t,e,n){return u(this,t,e,n,!0)},a.prototype.removeListener=function(t,e,n,r){var c=o?o+t:t;if(!this._events[c])return this;if(!e)return f(this,c),this;var i=this._events[c];if(i.fn)i.fn!==e||r&&!i.once||n&&i.context!==n||f(this,c);else{for(var u=0,a=[],s=i.length;u<s;u++)(i[u].fn!==e||r&&!i[u].once||n&&i[u].context!==n)&&a.push(i[u]);a.length?this._events[c]=1===a.length?a[0]:a:f(this,c)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=o?o+t:t,this._events[e]&&f(this,e)):(this._events=new c,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,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.payloadId=function(){return(new Date).getTime()*Math.pow(10,3)+Math.floor(Math.random()*Math.pow(10,3))}}])}));
var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function o(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var c=function(){return(c=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function i(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}function u(t,e,n,r){var o,c=arguments.length,i=c<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(i=(c<3?o(i):c>3?o(e,n,i):o(e,n))||i);return c>3&&i&&Object.defineProperty(e,n,i),i}function f(t,e){return function(n,r){e(n,r,t)}}function a(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function s(t,e,n,r){return new(n||(n=Promise))((function(o,c){function i(t){try{f(r.next(t))}catch(t){c(t)}}function u(t){try{f(r.throw(t))}catch(t){c(t)}}function f(t){t.done?o(t.value):new n((function(e){e(t.value)})).then(i,u)}f((r=r.apply(t,e||[])).next())}))}function l(t,e){var n,r,o,c,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return c={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function u(c){return function(u){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=e.call(t,i)}catch(t){c=[6,t],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}function p(t,e){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}function d(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function h(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,c=n.call(t),i=[];try{for(;(void 0===e||e-- >0)&&!(r=c.next()).done;)i.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=c.return)&&n.call(c)}finally{if(o)throw o.error}}return i}function y(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(h(arguments[e]));return t}function v(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var c=arguments[e],i=0,u=c.length;i<u;i++,o++)r[o]=c[i];return r}function _(t){return this instanceof _?(this.v=t,this):new _(t)}function b(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(t,e||[]),c=[];return r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r;function i(t){o[t]&&(r[t]=function(e){return new Promise((function(n,r){c.push([t,e,n,r])>1||u(t,e)}))})}function u(t,e){try{(n=o[t](e)).value instanceof _?Promise.resolve(n.value.v).then(f,a):s(c[0][2],n)}catch(t){s(c[0][3],t)}var n}function f(t){u("next",t)}function a(t){u("throw",t)}function s(t,e){t(e),c.shift(),c.length&&u(c[0][0],c[0][1])}}function m(t){var e,n;return e={},r("next"),r("throw",(function(t){throw t})),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,o){e[r]=t[r]?function(e){return(n=!n)?{value:_(t[r](e)),done:"return"===r}:o?o(e):e}:o}}function w(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=d(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,o){(function(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)})(r,o,(e=t[n](e)).done,e.value)}))}}}function O(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function x(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function g(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(0).__importDefault(n(2));e.default=r.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(0),o=r.__importDefault(n(3)),c=n(4);class i extends o.default{constructor(t){super(),this._connected=!1,this.connection=t,this.connection.connected&&(this.connected=!0)}set connected(t){this._connected=t,!0===t?(this.emit("open"),this.emit("connect")):(this.emit("close"),this.emit("disconnect"))}get connected(){return this._connected}open(){return this.connected?Promise.resolve():new Promise((t,e)=>{this.connection.on("disconnect",()=>{this.connected=!1,e()}),this.connection.on("connect",()=>{this.connected=!0,t()}),this.connection.open()})}close(){return this.connected=!1,this.connection.close()}send(t,e){return r.__awaiter(this,void 0,void 0,(function*(){return yield this.connection.send({id:c.payloadId(),jsonrpc:"2.0",method:t,params:e||{}})}))}}e.default=i},function(t,e,n){"use strict";var r=Object.prototype.hasOwnProperty,o="~";function c(){}function i(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function u(t,e,n,r,c){if("function"!=typeof n)throw new TypeError("The listener must be a function");var u=new i(n,r||t,c),f=o?o+e:e;return t._events[f]?t._events[f].fn?t._events[f]=[t._events[f],u]:t._events[f].push(u):(t._events[f]=u,t._eventsCount++),t}function f(t,e){0==--t._eventsCount?t._events=new c:delete t._events[e]}function a(){this._events=new c,this._eventsCount=0}Object.create&&(c.prototype=Object.create(null),(new c).__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,c=n.length,i=new Array(c);r<c;r++)i[r]=n[r].fn;return i},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,c,i){var u=o?o+t:t;if(!this._events[u])return!1;var f,a,s=this._events[u],l=arguments.length;if(s.fn){switch(s.once&&this.removeListener(t,s.fn,void 0,!0),l){case 1:return s.fn.call(s.context),!0;case 2:return s.fn.call(s.context,e),!0;case 3:return s.fn.call(s.context,e,n),!0;case 4:return s.fn.call(s.context,e,n,r),!0;case 5:return s.fn.call(s.context,e,n,r,c),!0;case 6:return s.fn.call(s.context,e,n,r,c,i),!0}for(a=1,f=new Array(l-1);a<l;a++)f[a-1]=arguments[a];s.fn.apply(s.context,f)}else{var p,d=s.length;for(a=0;a<d;a++)switch(s[a].once&&this.removeListener(t,s[a].fn,void 0,!0),l){case 1:s[a].fn.call(s[a].context);break;case 2:s[a].fn.call(s[a].context,e);break;case 3:s[a].fn.call(s[a].context,e,n);break;case 4:s[a].fn.call(s[a].context,e,n,r);break;default:if(!f)for(p=1,f=new Array(l-1);p<l;p++)f[p-1]=arguments[p];s[a].fn.apply(s[a].context,f)}}return!0},a.prototype.on=function(t,e,n){return u(this,t,e,n,!1)},a.prototype.once=function(t,e,n){return u(this,t,e,n,!0)},a.prototype.removeListener=function(t,e,n,r){var c=o?o+t:t;if(!this._events[c])return this;if(!e)return f(this,c),this;var i=this._events[c];if(i.fn)i.fn!==e||r&&!i.once||n&&i.context!==n||f(this,c);else{for(var u=0,a=[],s=i.length;u<s;u++)(i[u].fn!==e||r&&!i[u].once||n&&i[u].context!==n)&&a.push(i[u]);a.length?this._events[c]=1===a.length?a[0]:a:f(this,c)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=o?o+t:t,this._events[e]&&f(this,e)):(this._events=new c,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,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.payloadId=function(){return(new Date).getTime()*Math.pow(10,3)+Math.floor(Math.random()*Math.pow(10,3))}}])}));
{
"name": "basic-provider",
"description": "Basic Provider Library",
"version": "1.5.0",
"version": "1.6.0",
"author": "Pedro Gomes <github.com/pedrouid>",

@@ -6,0 +6,0 @@ "license": "MIT",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc