New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

swimmer

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swimmer - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

9

es/index.js
import _regeneratorRuntime from "babel-runtime/regenerator";
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }

@@ -15,6 +17,7 @@

var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultConfig;
var concurrency = config.concurrency,
started = config.started,
tasks = config.tasks;
var _defaultConfig$config = _extends({}, defaultConfig, config),
concurrency = _defaultConfig$config.concurrency,
started = _defaultConfig$config.started,
tasks = _defaultConfig$config.tasks;

@@ -21,0 +24,0 @@ var onSettles = [];

@@ -9,2 +9,4 @@ "use strict";

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
exports.createPool = createPool;

@@ -27,6 +29,7 @@ exports.poolAll = poolAll;

var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultConfig;
var concurrency = config.concurrency,
started = config.started,
tasks = config.tasks;
var _defaultConfig$config = _extends({}, defaultConfig, config),
concurrency = _defaultConfig$config.concurrency,
started = _defaultConfig$config.started,
tasks = _defaultConfig$config.tasks;

@@ -33,0 +36,0 @@ var onSettles = [];

{
"name": "swimmer",
"version": "1.0.3",
"version": "1.0.4",
"description": "An async task pooling and throttling utility for javascript.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -1,4 +0,3 @@

# 🏊 swimmer 🏊‍
# 🏊‍ swimmer
[![Travis CI Build Status](https://travis-ci.org/tannerlinsley/swimmer.svg?branch=master)](https://travis-ci.org/tannerlinsley/swimmer)
[![David Dependancy Status](https://david-dm.org/tannerlinsley/swimmer.svg)](https://david-dm.org/tannerlinsley/swimmer)

@@ -30,3 +29,5 @@ [![npm package v](https://img.shields.io/npm/v/swimmer.svg)](https://www.npmjs.org/package/swimmer)

## UMD
`https://unpkg.com/swimmer/umd/swimmer.min.js`
```
https://unpkg.com/swimmer/umd/swimmer.min.js
```

@@ -129,3 +130,3 @@ ## Inline Pooling

Swimmer exports two functions:
- `poolAll`
- `poolAll` - creates an inline async/await/promise compatible pool
- Arguments

@@ -135,10 +136,5 @@ - `Array[Function => Promise]` - An array of functions that return a promise.

- Returns
- A `Promise`
- A `Promise` that resolves when all tasks are complete, or throws an error if one of them fails.
- Example:
```javascript
async function () {
const res = await poolAll(tasks.map(task => () => task()), 5)
}
```
- `createPool`
- `createPool` - creates an custom pool
- Arguments

@@ -145,0 +141,0 @@ - `Object{}` - An optional configuration object for this pool

/*!
* swimmer v1.0.3 - https://github.com/tannerlinsley/swimmer
* swimmer v1.0.4 - https://github.com/tannerlinsley/swimmer
* MIT Licensed

@@ -99,2 +99,4 @@ */

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }

@@ -112,6 +114,7 @@

var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultConfig;
var concurrency = config.concurrency,
started = config.started,
tasks = config.tasks;
var _defaultConfig$config = _extends({}, defaultConfig, config),
concurrency = _defaultConfig$config.concurrency,
started = _defaultConfig$config.started,
tasks = _defaultConfig$config.tasks;

@@ -118,0 +121,0 @@ var onSettles = [];

/*!
* swimmer v1.0.3 - https://github.com/tannerlinsley/swimmer
* swimmer v1.0.4 - https://github.com/tannerlinsley/swimmer
* MIT Licensed
*/
!function(t,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r();else if("function"==typeof define&&define.amd)define([],r);else{var e=r();for(var n in e)("object"==typeof exports?exports:t)[n]=e[n]}}("undefined"!=typeof self?self:this,function(){return function(t){var r={};function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=0)}([function(t,r,e){t.exports=e(1)},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.createPool=a,r.poolAll=function(t,r){var e=this;return new Promise(function(n,u){var c=a(r),f=[];c.onSettled(function(){n(f)}),c.onError(function(t){u(t)}),t.forEach(function(t,r){c.add(i(o.a.mark(function n(){var i;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t();case 2:return i=e.sent,f[r]=i,e.abrupt("return",i);case 5:case"end":return e.stop()}},n,e)})))}),c.start()})};var n=e(2),o=e.n(n);function i(t){return function(){var r=t.apply(this,arguments);return new Promise(function(t,e){return function n(o,i){try{var u=r[o](i),a=u.value}catch(t){return void e(t)}if(!u.done)return Promise.resolve(a).then(function(t){n("next",t)},function(t){n("throw",t)});t(a)}("next")})}}var u={concurrency:5,started:!0,tasks:[]};function a(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u,e=r.concurrency,n=[],a=[],c=[],f=r.started,s=[],h=r.tasks,l=e,p=function r(){if(f)if(h.length||s.length)for(var e=function(){var e=h.shift();s.push(e),i(o.a.mark(function n(){var i,u,f;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i=!1,u=void 0,f=void 0,t.prev=3,t.next=6,e();case 6:u=t.sent,i=!0,t.next=13;break;case 10:t.prev=10,t.t0=t.catch(3),f=t.t0;case 13:s=s.filter(function(t){return t!==e}),i?c.forEach(function(t){return t(u,e)}):a.forEach(function(t){return t(f,e)}),r();case 16:case"end":return t.stop()}},n,t,[[3,10]])}))()};s.length<l&&h.length;)e();else n.forEach(function(t){return t()})};return{add:function(t){h.push(t),p()},throttle:function(t){l=t},onSettled:function(t){return n.push(t),function(){n=n.filter(function(r){return r!==t})}},onError:function(t){return a.push(t),function(){a=a.filter(function(r){return r!==t})}},onSuccess:function(t){return c.push(t),function(){c=c.filter(function(r){return r!==t})}},stop:function(){f=!1},start:function(){f=!0,p()},clear:function(){h=[]},getActive:function(){return s},getPending:function(){return h},getAll:function(){return[].concat(s,h)},isRunning:function(){return f},isSettled:function(){return!f&&!s.length&&!h.length}}}},function(t,r,e){t.exports=e(3)},function(t,r,e){var n=function(){return this}()||Function("return this")(),o=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,i=o&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=e(4),o)n.regeneratorRuntime=i;else try{delete n.regeneratorRuntime}catch(t){n.regeneratorRuntime=void 0}},function(t,r){!function(r){"use strict";var e,n=Object.prototype,o=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},u=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag",f="object"==typeof t,s=r.regeneratorRuntime;if(s)f&&(t.exports=s);else{(s=r.regeneratorRuntime=f?t.exports:{}).wrap=x;var h="suspendedStart",l="suspendedYield",p="executing",v="completed",d={},y={};y[u]=function(){return this};var g=Object.getPrototypeOf,m=g&&g(g(N([])));m&&m!==n&&o.call(m,u)&&(y=m);var w=_.prototype=E.prototype=Object.create(y);L.prototype=w.constructor=_,_.constructor=L,_[c]=L.displayName="GeneratorFunction",s.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===L||"GeneratorFunction"===(r.displayName||r.name))},s.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(w),t},s.awrap=function(t){return{__await:t}},j(O.prototype),O.prototype[a]=function(){return this},s.AsyncIterator=O,s.async=function(t,r,e,n){var o=new O(x(t,r,e,n));return s.isGeneratorFunction(r)?o:o.next().then(function(t){return t.done?t.value:o.next()})},j(w),w[c]="Generator",w[u]=function(){return this},w.toString=function(){return"[object Generator]"},s.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},s.values=N,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(R),!t)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return a.type="throw",a.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var u=this.tryEntries[i],a=u.completion;if("root"===u.tryLoc)return n("end");if(u.tryLoc<=this.prev){var c=o.call(u,"catchLoc"),f=o.call(u,"finallyLoc");if(c&&f){if(this.prev<u.catchLoc)return n(u.catchLoc,!0);if(this.prev<u.finallyLoc)return n(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return n(u.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return n(u.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var u=i?i.completion:{};return u.type=t,u.arg=r,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(u)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),d},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),R(e),d}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;R(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),d}}}function x(t,r,e,n){var o=r&&r.prototype instanceof E?r:E,i=Object.create(o.prototype),u=new S(n||[]);return i._invoke=function(t,r,e){var n=h;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===v){if("throw"===o)throw i;return G()}for(e.method=o,e.arg=i;;){var u=e.delegate;if(u){var a=P(u,e);if(a){if(a===d)continue;return a}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(n===h)throw n=v,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n=p;var c=b(t,r,e);if("normal"===c.type){if(n=e.done?v:l,c.arg===d)continue;return{value:c.arg,done:e.done}}"throw"===c.type&&(n=v,e.method="throw",e.arg=c.arg)}}}(t,e,u),i}function b(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}function E(){}function L(){}function _(){}function j(t){["next","throw","return"].forEach(function(r){t[r]=function(t){return this._invoke(r,t)}})}function O(t){var r;this._invoke=function(e,n){function i(){return new Promise(function(r,i){!function r(e,n,i,u){var a=b(t[e],t,n);if("throw"!==a.type){var c=a.arg,f=c.value;return f&&"object"==typeof f&&o.call(f,"__await")?Promise.resolve(f.__await).then(function(t){r("next",t,i,u)},function(t){r("throw",t,i,u)}):Promise.resolve(f).then(function(t){c.value=t,i(c)},u)}u(a.arg)}(e,n,r,i)})}return r=r?r.then(i,i):i()}}function P(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method))return d;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=b(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,d;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,d):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function k(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function R(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function N(t){if(t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n<t.length;)if(o.call(t,n))return r.value=t[n],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}return{next:G}}function G(){return{value:e,done:!0}}}(function(){return this}()||Function("return this")())}]).default});
!function(t,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r();else if("function"==typeof define&&define.amd)define([],r);else{var e=r();for(var n in e)("object"==typeof exports?exports:t)[n]=e[n]}}("undefined"!=typeof self?self:this,function(){return function(t){var r={};function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=0)}([function(t,r,e){t.exports=e(1)},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.createPool=c,r.poolAll=function(t,r){var e=this;return new Promise(function(n,i){var u=c(r),f=[];u.onSettled(function(){n(f)}),u.onError(function(t){i(t)}),t.forEach(function(t,r){u.add(a(o.a.mark(function n(){var i;return o.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t();case 2:return i=e.sent,f[r]=i,e.abrupt("return",i);case 5:case"end":return e.stop()}},n,e)})))}),u.start()})};var n=e(2),o=e.n(n),i=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var e=arguments[r];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t};function a(t){return function(){var r=t.apply(this,arguments);return new Promise(function(t,e){return function n(o,i){try{var a=r[o](i),u=a.value}catch(t){return void e(t)}if(!a.done)return Promise.resolve(u).then(function(t){n("next",t)},function(t){n("throw",t)});t(u)}("next")})}}var u={concurrency:5,started:!0,tasks:[]};function c(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u,e=i({},u,r),n=e.concurrency,c=[],f=[],s=[],h=e.started,l=[],p=e.tasks,v=n,y=function r(){if(h)if(p.length||l.length)for(var e=function(){var e=p.shift();l.push(e),a(o.a.mark(function n(){var i,a,u;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i=!1,a=void 0,u=void 0,t.prev=3,t.next=6,e();case 6:a=t.sent,i=!0,t.next=13;break;case 10:t.prev=10,t.t0=t.catch(3),u=t.t0;case 13:l=l.filter(function(t){return t!==e}),i?s.forEach(function(t){return t(a,e)}):f.forEach(function(t){return t(u,e)}),r();case 16:case"end":return t.stop()}},n,t,[[3,10]])}))()};l.length<v&&p.length;)e();else c.forEach(function(t){return t()})};return{add:function(t){p.push(t),y()},throttle:function(t){v=t},onSettled:function(t){return c.push(t),function(){c=c.filter(function(r){return r!==t})}},onError:function(t){return f.push(t),function(){f=f.filter(function(r){return r!==t})}},onSuccess:function(t){return s.push(t),function(){s=s.filter(function(r){return r!==t})}},stop:function(){h=!1},start:function(){h=!0,y()},clear:function(){p=[]},getActive:function(){return l},getPending:function(){return p},getAll:function(){return[].concat(l,p)},isRunning:function(){return h},isSettled:function(){return!h&&!l.length&&!p.length}}}},function(t,r,e){t.exports=e(3)},function(t,r,e){var n=function(){return this}()||Function("return this")(),o=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,i=o&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=e(4),o)n.regeneratorRuntime=i;else try{delete n.regeneratorRuntime}catch(t){n.regeneratorRuntime=void 0}},function(t,r){!function(r){"use strict";var e,n=Object.prototype,o=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag",f="object"==typeof t,s=r.regeneratorRuntime;if(s)f&&(t.exports=s);else{(s=r.regeneratorRuntime=f?t.exports:{}).wrap=x;var h="suspendedStart",l="suspendedYield",p="executing",v="completed",y={},d={};d[a]=function(){return this};var g=Object.getPrototypeOf,m=g&&g(g(N([])));m&&m!==n&&o.call(m,a)&&(d=m);var w=O.prototype=E.prototype=Object.create(d);L.prototype=w.constructor=O,O.constructor=L,O[c]=L.displayName="GeneratorFunction",s.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===L||"GeneratorFunction"===(r.displayName||r.name))},s.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,O):(t.__proto__=O,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(w),t},s.awrap=function(t){return{__await:t}},j(_.prototype),_.prototype[u]=function(){return this},s.AsyncIterator=_,s.async=function(t,r,e,n){var o=new _(x(t,r,e,n));return s.isGeneratorFunction(r)?o:o.next().then(function(t){return t.done?t.value:o.next()})},j(w),w[c]="Generator",w[a]=function(){return this},w.toString=function(){return"[object Generator]"},s.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},s.values=N,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(R),!t)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),f=o.call(a,"finallyLoc");if(c&&f){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),R(e),y}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;R(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}}}function x(t,r,e,n){var o=r&&r.prototype instanceof E?r:E,i=Object.create(o.prototype),a=new S(n||[]);return i._invoke=function(t,r,e){var n=h;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===v){if("throw"===o)throw i;return G()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var u=P(a,e);if(u){if(u===y)continue;return u}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(n===h)throw n=v,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n=p;var c=b(t,r,e);if("normal"===c.type){if(n=e.done?v:l,c.arg===y)continue;return{value:c.arg,done:e.done}}"throw"===c.type&&(n=v,e.method="throw",e.arg=c.arg)}}}(t,e,a),i}function b(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}function E(){}function L(){}function O(){}function j(t){["next","throw","return"].forEach(function(r){t[r]=function(t){return this._invoke(r,t)}})}function _(t){var r;this._invoke=function(e,n){function i(){return new Promise(function(r,i){!function r(e,n,i,a){var u=b(t[e],t,n);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&o.call(f,"__await")?Promise.resolve(f.__await).then(function(t){r("next",t,i,a)},function(t){r("throw",t,i,a)}):Promise.resolve(f).then(function(t){c.value=t,i(c)},a)}a(u.arg)}(e,n,r,i)})}return r=r?r.then(i,i):i()}}function P(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=b(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function k(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function R(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function N(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n<t.length;)if(o.call(t,n))return r.value=t[n],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}return{next:G}}function G(){return{value:e,done:!0}}}(function(){return this}()||Function("return this")())}]).default});
//# sourceMappingURL=swimmer.min.js.map

Sorry, the diff of this file is not supported yet

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