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

@async-af/findindex

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@async-af/findindex - npm Package Compare versions

Comparing version 6.0.0 to 7.0.0

61

esm/index.js
/*!
* @async-af/findindex/esm v6.0.0
* @async-af/findindex/esm v7.0.0
*
* AsyncAF (Async/Await Fun) findIndexAF method
* AsyncAF (The asynciest of async libs there ever was or ever will be...AsyncAF!?) findIndexAF method
* (https://async-af.js.org/AsyncAF#findIndexAF)

@@ -18,5 +18,37 @@ *

var promiseAllWithHoles = function promiseAllWithHoles(promises) {
return new Promise(function (resolve, reject) {
var length = promises.length >>> 0;
var result = Array(length);
var pending = length;
var i = length;
if (!length) return resolve(result);
var settlePromise = function settlePromise(i) {
return Promise.resolve(promises[i]).then(function (value) {
if (i in promises) result[i] = value;
if (! --pending) resolve(result);
}, reject);
};
while (i--) {
settlePromise(i);
}
});
};
var parallel = function parallel(arr, mapper) {
var thisArg = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
return promiseAllWithHoles(arr, function (el) {
return el;
}).then(!mapper ? undefined : function (arr) {
return promiseAllWithHoles(Array.prototype.map.call(arr, mapper, thisArg));
});
};
/**
* returns the index of the first element in the array that satisfies the provided callback function; otherwise, `-1`
* resolves to the index of the first element in the array that satisfies the provided callback function; otherwise, `-1`
*
* *Note*: since `findIndexAF` is run in parallel, `callback` will be run on all indices even if one of the first few indices passes the test; if this behavior is not desireable, consider using `series.findIndexAF` or its alias, `io.findIndexAF`
*
* @param {callback} callback function to test each element in the array

@@ -38,6 +70,7 @@ *

*
* AsyncAF(inventory).findAF(part => part.name === 'screws');
* AsyncAF(inventory).findIndexAF(part => part.name === 'screws');
* // Promise that resolves to 2
* @since 3.5.0
* @see findIndex
* @see findIndex (alias)
* @see {@link AsyncAF#series series.findIndexAF}
* @memberof AsyncAF#

@@ -47,6 +80,22 @@ */

var findIndexAF = function findIndexAF(callback$$1) {
var _this = this;
var thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
return this.then(function (arr) {
if (!permissiveIsArrayLike(arr)) throw TypeError("findIndexAF cannot be called on ".concat(arr, ", only on an Array or array-like Object"));
return Array.prototype.findIndex.call(arr, callback$$1, thisArg);
if (typeof callback$$1 !== 'function') throw TypeError("".concat(callback$$1, " is not a function"));
var filled = Array.from(arr);
var length = filled.length >>> 0;
return _this.inSeries ? !length && -1 || function seriesFindIndexAF(arr, i) {
return Promise.resolve(arr[i]).then(function (el) {
arr[i] = el;
return Promise.resolve(callback$$1.call(thisArg, el, i, arr)).then(function (bool) {
if (bool) return i;
if (i === length - 1) return -1;
return seriesFindIndexAF(arr, i + 1);
});
});
}(filled, 0) : parallel(filled, callback$$1, thisArg).then(function (bools) {
return bools.indexOf(true);
});
});

@@ -53,0 +102,0 @@ };

6

esm/min.js
/*!
* @async-af/findindex/esm/min v6.0.0
* @async-af/findindex/esm/min v7.0.0
*
* AsyncAF (Async/Await Fun) findIndexAF method
* AsyncAF (The asynciest of async libs there ever was or ever will be...AsyncAF!?) findIndexAF method
* (https://async-af.js.org/AsyncAF#findIndexAF)

@@ -12,3 +12,3 @@ *

*/
export default function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return this.then(e=>{if(!(Array.isArray(t=e)||null!=t&&null!=t.length))throw TypeError("findIndexAF cannot be called on ".concat(e,", only on an Array or array-like Object"));var t;return Array.prototype.findIndex.call(e,r,n)})};
var r=r=>new Promise((n,e)=>{var o=r.length>>>0,t=Array(o),i=o,a=o;if(!o)return n(t);for(var l=o=>Promise.resolve(r[o]).then(e=>{o in r&&(t[o]=e),--i||n(t)},e);a--;)l(a)});export default function(n){var e=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return this.then(t=>{if(!(Array.isArray(i=t)||null!=i&&null!=i.length))throw TypeError("findIndexAF cannot be called on ".concat(t,", only on an Array or array-like Object"));var i;if("function"!=typeof n)throw TypeError("".concat(n," is not a function"));var a=Array.from(t),l=a.length>>>0;return e.inSeries?l?function r(e,t){return Promise.resolve(e[t]).then(i=>(e[t]=i,Promise.resolve(n.call(o,i,t,e)).then(n=>n?t:t===l-1?-1:r(e,t+1))))}(a,0):-1:function(n,e){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return r(n).then(e?n=>r(Array.prototype.map.call(n,e,o)):void 0)}(a,n,o).then(r=>r.indexOf(!0))})};
//# sourceMappingURL=min.js.map
/*!
* @async-af/findindex v6.0.0
* @async-af/findindex v7.0.0
*
* AsyncAF (Async/Await Fun) findIndexAF method
* AsyncAF (The asynciest of async libs there ever was or ever will be...AsyncAF!?) findIndexAF method
* (https://async-af.js.org/AsyncAF#findIndexAF)

@@ -60,7 +60,3 @@ *

/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }

@@ -71,5 +67,24 @@ /******/ };

/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules

@@ -109,2 +124,3 @@ /******/ __webpack_require__.n = function(module) {

* @param {[]=} array
* @returns {any}
*/

@@ -130,2 +146,53 @@ function callback(currentValue, index, array) {}

/***/ "./lib/methods/_internal/promiseAllWithHoles.js":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
const promiseAllWithHoles = promises => new Promise((resolve, reject) => {
const length = promises.length >>> 0;
const result = Array(length);
let pending = length;
let i = length;
if (!length) return resolve(result);
const settlePromise = i => Promise.resolve(promises[i]).then(value => {
if (i in promises) result[i] = value;
if (! --pending) resolve(result);
}, reject);
while (i--) settlePromise(i);
});
/* harmony default export */ __webpack_exports__["default"] = (promiseAllWithHoles);
/***/ }),
/***/ "./lib/methods/_internal/resolve.js":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "serial", function() { return serial; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parallel", function() { return parallel; });
/* harmony import */ var _promiseAllWithHoles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./lib/methods/_internal/promiseAllWithHoles.js");
const serial = arr => function resolveSerially(resolved, i) {
const length = resolved.length;
if (!length) return Promise.resolve(resolved);
const hole = !(i in arr);
return Promise.resolve(arr[i]).then(el => {
if (!hole) resolved[i] = el;
if (i === length - 1) return resolved;
return resolveSerially(resolved, i + 1);
});
}(Array(arr.length >>> 0), 0);
const parallel = (arr, mapper, thisArg = undefined) => Object(_promiseAllWithHoles__WEBPACK_IMPORTED_MODULE_0__["default"])(arr, el => el).then(!mapper ? undefined : arr => Object(_promiseAllWithHoles__WEBPACK_IMPORTED_MODULE_0__["default"])(Array.prototype.map.call(arr, mapper, thisArg)));
/***/ }),
/***/ "./lib/methods/arrays/findIndexAF.js":

@@ -138,8 +205,12 @@ /***/ (function(module, __webpack_exports__, __webpack_require__) {

/* harmony import */ var _internal_permissiveIsArrayLike__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./lib/methods/_internal/permissiveIsArrayLike.js");
/* harmony import */ var _internal_resolve__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("./lib/methods/_internal/resolve.js");
// eslint-disable-line no-unused-vars
/**
* returns the index of the first element in the array that satisfies the provided callback function; otherwise, `-1`
* resolves to the index of the first element in the array that satisfies the provided callback function; otherwise, `-1`
*
* *Note*: since `findIndexAF` is run in parallel, `callback` will be run on all indices even if one of the first few indices passes the test; if this behavior is not desireable, consider using `series.findIndexAF` or its alias, `io.findIndexAF`
*
* @param {callback} callback function to test each element in the array

@@ -161,6 +232,7 @@ *

*
* AsyncAF(inventory).findAF(part => part.name === 'screws');
* AsyncAF(inventory).findIndexAF(part => part.name === 'screws');
* // Promise that resolves to 2
* @since 3.5.0
* @see findIndex
* @see findIndex (alias)
* @see {@link AsyncAF#series series.findIndexAF}
* @memberof AsyncAF#

@@ -172,3 +244,15 @@ */

if (!Object(_internal_permissiveIsArrayLike__WEBPACK_IMPORTED_MODULE_1__["default"])(arr)) throw TypeError(`findIndexAF cannot be called on ${arr}, only on an Array or array-like Object`);
return Array.prototype.findIndex.call(arr, callback, thisArg);
if (typeof callback !== 'function') throw TypeError(`${callback} is not a function`);
const filled = Array.from(arr);
const length = filled.length >>> 0;
return this.inSeries ? !length && -1 || function seriesFindIndexAF(arr, i) {
return Promise.resolve(arr[i]).then(el => {
arr[i] = el;
return Promise.resolve(callback.call(thisArg, el, i, arr)).then(bool => {
if (bool) return i;
if (i === length - 1) return -1;
return seriesFindIndexAF(arr, i + 1);
});
});
}(filled, 0) : Object(_internal_resolve__WEBPACK_IMPORTED_MODULE_2__["parallel"])(filled, callback, thisArg).then(bools => bools.indexOf(true));
});

@@ -175,0 +259,0 @@ };

/*!
* @async-af/findindex/legacy/min v6.0.0
* @async-af/findindex/legacy/min v7.0.0
*
* AsyncAF (Async/Await Fun) findIndexAF method
* AsyncAF (The asynciest of async libs there ever was or ever will be...AsyncAF!?) findIndexAF method
* (https://async-af.js.org/AsyncAF#findIndexAF)

@@ -12,3 +12,3 @@ *

*/
var e,n;e="undefined"!=typeof self?self:this,n=function(){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=165)}({165:function(e,n,t){"use strict";t.r(n);var r=t(6);n.default=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return this.then(function(t){if(!Object(r.a)(t))throw TypeError("findIndexAF cannot be called on ".concat(t,", only on an Array or array-like Object"));return Array.prototype.findIndex.call(t,e,n)})}},6:function(e,n,t){"use strict";n.a=function(e){return Array.isArray(e)||null!=e&&null!=e.length}}}).default},"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("findIndexAF",[],n):"object"==typeof exports?exports.findIndexAF=n():e.findIndexAF=n();
var t,n;t="undefined"!=typeof self?self:this,n=function(){return function(t){var n={};function r(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=n,r.d=function(t,n,e){r.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:e})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,n){if(1&n&&(t=r(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(r.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)r.d(e,o,function(n){return t[n]}.bind(null,o));return e},r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,"a",n),n},r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r.p="",r(r.s=126)}([function(t,n){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,n,r){var e=r(30)("wks"),o=r(28),i=r(0).Symbol,u="function"==typeof i;(t.exports=function(t){return e[t]||(e[t]=u&&i[t]||(u?i:o)("Symbol."+t))}).store=e},function(t,n,r){t.exports=r(67)},function(t,n){var r=t.exports={version:"2.5.5"};"number"==typeof __e&&(__e=r)},function(t,n,r){var e=r(5);t.exports=function(t){if(!e(t))throw TypeError(t+" is not an object!");return t}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,r){var e=r(10),o=r(25);t.exports=r(8)?function(t,n,r){return e.f(t,n,o(1,r))}:function(t,n,r){return t[n]=r,t}},function(t,n,r){var e=r(0),o=r(3),i=r(11),u=r(6),c=r(12),f=function(t,n,r){var s,a,l,p=t&f.F,v=t&f.G,h=t&f.S,d=t&f.P,y=t&f.B,x=t&f.W,m=v?o:o[n]||(o[n]={}),_=m.prototype,g=v?e:h?e[n]:(e[n]||{}).prototype;for(s in v&&(r=n),r)(a=!p&&g&&void 0!==g[s])&&c(m,s)||(l=a?g[s]:r[s],m[s]=v&&"function"!=typeof g[s]?r[s]:y&&a?i(l,e):x&&g[s]==l?function(t){var n=function(n,r,e){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,r)}return new t(n,r,e)}return t.apply(this,arguments)};return n.prototype=t.prototype,n}(l):d&&"function"==typeof l?i(Function.call,l):l,d&&((m.virtual||(m.virtual={}))[s]=l,t&f.R&&_&&!_[s]&&u(_,s,l)))};f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,t.exports=f},function(t,n,r){t.exports=!r(18)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n){t.exports={}},function(t,n,r){var e=r(4),o=r(56),i=r(46),u=Object.defineProperty;n.f=r(8)?Object.defineProperty:function(t,n,r){if(e(t),n=i(n,!0),e(r),o)try{return u(t,n,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[n]=r.value),t}},function(t,n,r){var e=r(13);t.exports=function(t,n,r){if(e(t),void 0===n)return t;switch(r){case 1:return function(r){return t.call(n,r)};case 2:return function(r,e){return t.call(n,r,e)};case 3:return function(r,e,o){return t.call(n,r,e,o)}}return function(){return t.apply(n,arguments)}}},function(t,n){var r={}.hasOwnProperty;t.exports=function(t,n){return r.call(t,n)}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,n,r){var e=r(47),o=r(20);t.exports=function(t){return e(o(t))}},function(t,n,r){"use strict";r.d(n,"b",function(){return u}),r.d(n,"a",function(){return c});var e=r(2),o=r.n(e),i=r(26),u=function(t){return function n(r,e){var i=r.length;if(!i)return o.a.resolve(r);var u=!(e in t);return o.a.resolve(t[e]).then(function(t){return u||(r[e]=t),e===i-1?r:n(r,e+1)})}(Array(t.length>>>0),0)},c=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return Object(i.a)(t,function(t){return t}).then(n?function(t){return Object(i.a)(Array.prototype.map.call(t,n,r))}:void 0)}},function(t,n,r){var e=r(10).f,o=r(12),i=r(1)("toStringTag");t.exports=function(t,n,r){t&&!o(t=r?t:t.prototype,i)&&e(t,i,{configurable:!0,value:n})}},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n,r){var e=r(5),o=r(0).document,i=e(o)&&e(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,n){var r=Math.ceil,e=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?e:r)(t)}},function(t,n,r){var e=r(30)("keys"),o=r(28);t.exports=function(t){return e[t]||(e[t]=o(t))}},function(t,n,r){"use strict";var e=r(13);t.exports.f=function(t){return new function(t){var n,r;this.promise=new t(function(t,e){if(void 0!==n||void 0!==r)throw TypeError("Bad Promise constructor");n=t,r=e}),this.resolve=e(n),this.reject=e(r)}(t)}},function(t,n,r){"use strict";n.a=function(t){return Array.isArray(t)||null!=t&&null!=t.length}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,r){"use strict";var e=r(2),o=r.n(e);n.a=function(t){return new o.a(function(n,r){var e=t.length>>>0,i=Array(e),u=e,c=e;if(!e)return n(i);for(var f=function(e){return o.a.resolve(t[e]).then(function(r){e in t&&(i[e]=r),--u||n(i)},r)};c--;)f(c)})}},function(t,n,r){var e=r(21),o=Math.min;t.exports=function(t){return t>0?o(e(t),9007199254740991):0}},function(t,n){var r=0,e=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+e).toString(36))}},function(t,n){t.exports=!0},function(t,n,r){var e=r(0),o=e["__core-js_shared__"]||(e["__core-js_shared__"]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n,r){var e=r(14),o=r(1)("toStringTag"),i="Arguments"==e(function(){return arguments}());t.exports=function(t){var n,r,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,n){try{return t[n]}catch(t){}}(n=Object(t),o))?r:i?e(n):"Object"==(u=e(n))&&"function"==typeof n.callee?"Arguments":u}},function(t,n,r){"use strict";var e=r(29),o=r(7),i=r(48),u=r(6),c=r(9),f=r(65),s=r(17),a=r(58),l=r(1)("iterator"),p=!([].keys&&"next"in[].keys()),v=function(){return this};t.exports=function(t,n,r,h,d,y,x){f(r,n,h);var m,_,g,b=function(t){if(!p&&t in S)return S[t];switch(t){case"keys":case"values":return function(){return new r(this,t)}}return function(){return new r(this,t)}},w=n+" Iterator",j="values"==d,O=!1,S=t.prototype,P=S[l]||S["@@iterator"]||d&&S[d],T=P||b(d),A=d?j?b("entries"):T:void 0,M="Array"==n&&S.entries||P;if(M&&(g=a(M.call(new t)))!==Object.prototype&&g.next&&(s(g,w,!0),e||"function"==typeof g[l]||u(g,l,v)),j&&P&&"values"!==P.name&&(O=!0,T=function(){return P.call(this)}),e&&!x||!p&&!O&&S[l]||u(S,l,T),c[n]=T,c[w]=v,d)if(m={values:j?T:b("values"),keys:y?T:b("keys"),entries:A},x)for(_ in m)_ in S||i(S,_,m[_]);else o(o.P+o.F*(p||O),n,m);return m}},function(t,n,r){var e=r(0).document;t.exports=e&&e.documentElement},function(t,n,r){var e=r(4),o=r(13),i=r(1)("species");t.exports=function(t,n){var r,u=e(t).constructor;return void 0===u||void 0==(r=e(u)[i])?n:o(r)}},function(t,n,r){var e,o,i,u=r(11),c=r(59),f=r(34),s=r(19),a=r(0),l=a.process,p=a.setImmediate,v=a.clearImmediate,h=a.MessageChannel,d=a.Dispatch,y=0,x={},m=function(){var t=+this;if(x.hasOwnProperty(t)){var n=x[t];delete x[t],n()}},_=function(t){m.call(t.data)};p&&v||(p=function(t){for(var n=[],r=1;arguments.length>r;)n.push(arguments[r++]);return x[++y]=function(){c("function"==typeof t?t:Function(t),n)},e(y),y},v=function(t){delete x[t]},"process"==r(14)(l)?e=function(t){l.nextTick(u(m,t,1))}:d&&d.now?e=function(t){d.now(u(m,t,1))}:h?(i=(o=new h).port2,o.port1.onmessage=_,e=u(i.postMessage,i,1)):a.addEventListener&&"function"==typeof postMessage&&!a.importScripts?(e=function(t){a.postMessage(t+"","*")},a.addEventListener("message",_,!1)):e="onreadystatechange"in s("script")?function(t){f.appendChild(s("script")).onreadystatechange=function(){f.removeChild(this),m.call(t)}}:function(t){setTimeout(u(m,t,1),0)}),t.exports={set:p,clear:v}},function(t,n){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,n,r){var e=r(4),o=r(5),i=r(23);t.exports=function(t,n){if(e(t),o(n)&&n.constructor===t)return n;var r=i.f(t);return(0,r.resolve)(n),r.promise}},function(t,n,r){var e=r(20);t.exports=function(t){return Object(e(t))}},function(t,n,r){"use strict";var e=r(66)(!0);r(33)(String,"String",function(t){this._t=t+"",this._i=0},function(){var t,n=this._t,r=this._i;return r>=n.length?{value:void 0,done:!0}:(t=e(n,r),this._i+=t.length,{value:t,done:!1})})},function(t,n,r){var e=r(57),o=r(31);t.exports=Object.keys||function(t){return e(t,o)}},function(t,n,r){r(62);for(var e=r(0),o=r(6),i=r(9),u=r(1)("toStringTag"),c="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),f=0;f<c.length;f++){var s=c[f],a=e[s],l=a&&a.prototype;l&&!l[u]&&o(l,u,s),i[s]=i.Array}},function(t,n,r){var e=r(32),o=r(1)("iterator"),i=r(9);t.exports=r(3).getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[e(t)]}},function(t,n){},function(t,n,r){var e=r(11),o=r(51),i=r(52),u=r(4),c=r(27),f=r(43),s={},a={};(n=t.exports=function(t,n,r,l,p){var v,h,d,y,x=p?function(){return t}:f(t),m=e(r,l,n?2:1),_=0;if("function"!=typeof x)throw TypeError(t+" is not iterable!");if(i(x)){for(v=c(t.length);v>_;_++)if((y=n?m(u(h=t[_])[0],h[1]):m(t[_]))===s||y===a)return y}else for(d=x.call(t);!(h=d.next()).done;)if((y=o(d,m,h.value,n))===s||y===a)return y}).BREAK=s,n.RETURN=a},function(t,n,r){var e=r(5);t.exports=function(t,n){if(!e(t))return t;var r,o;if(n&&"function"==typeof(r=t.toString)&&!e(o=r.call(t)))return o;if("function"==typeof(r=t.valueOf)&&!e(o=r.call(t)))return o;if(!n&&"function"==typeof(r=t.toString)&&!e(o=r.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,n,r){var e=r(14);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==e(t)?t.split(""):Object(t)}},function(t,n,r){t.exports=r(6)},function(t,n,r){var e=r(4),o=r(55),i=r(31),u=r(22)("IE_PROTO"),c=function(){},f=function(){var t,n=r(19)("iframe"),e=i.length;for(n.style.display="none",r(34).appendChild(n),n.src="javascript:",(t=n.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),f=t.F;e--;)delete f.prototype[i[e]];return f()};t.exports=Object.create||function(t,n){var r;return null!==t?(c.prototype=e(t),r=new c,c.prototype=null,r[u]=t):r=f(),void 0===n?r:o(r,n)}},function(t,n){t.exports=function(t,n,r,e){if(!(t instanceof n)||void 0!==e&&e in t)throw TypeError(r+": incorrect invocation!");return t}},function(t,n,r){var e=r(4);t.exports=function(t,n,r,o){try{return o?n(e(r)[0],r[1]):n(r)}catch(n){var i=t.return;throw void 0!==i&&e(i.call(t)),n}}},function(t,n,r){var e=r(9),o=r(1)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(e.Array===t||i[o]===t)}},function(t,n,r){var e=r(6);t.exports=function(t,n,r){for(var o in n)r&&t[o]?t[o]=n[o]:e(t,o,n[o]);return t}},function(t,n,r){var e=r(1)("iterator"),o=!1;try{var i=[7][e]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(t){}t.exports=function(t,n){if(!n&&!o)return!1;var r=!1;try{var i=[7],u=i[e]();u.next=function(){return{done:r=!0}},i[e]=function(){return u},t(i)}catch(t){}return r}},function(t,n,r){var e=r(10),o=r(4),i=r(41);t.exports=r(8)?Object.defineProperties:function(t,n){o(t);for(var r,u=i(n),c=u.length,f=0;c>f;)e.f(t,r=u[f++],n[r]);return t}},function(t,n,r){t.exports=!r(8)&&!r(18)(function(){return 7!=Object.defineProperty(r(19)("div"),"a",{get:function(){return 7}}).a})},function(t,n,r){var e=r(12),o=r(15),i=r(60)(!1),u=r(22)("IE_PROTO");t.exports=function(t,n){var r,c=o(t),f=0,s=[];for(r in c)r!=u&&e(c,r)&&s.push(r);for(;n.length>f;)e(c,r=n[f++])&&(~i(s,r)||s.push(r));return s}},function(t,n,r){var e=r(12),o=r(39),i=r(22)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),e(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,n){t.exports=function(t,n,r){var e=void 0===r;switch(n.length){case 0:return e?t():t.call(r);case 1:return e?t(n[0]):t.call(r,n[0]);case 2:return e?t(n[0],n[1]):t.call(r,n[0],n[1]);case 3:return e?t(n[0],n[1],n[2]):t.call(r,n[0],n[1],n[2]);case 4:return e?t(n[0],n[1],n[2],n[3]):t.call(r,n[0],n[1],n[2],n[3])}return t.apply(r,n)}},function(t,n,r){var e=r(15),o=r(27),i=r(61);t.exports=function(t){return function(n,r,u){var c,f=e(n),s=o(f.length),a=i(u,s);if(t&&r!=r){for(;s>a;)if((c=f[a++])!=c)return!0}else for(;s>a;a++)if((t||a in f)&&f[a]===r)return t||a||0;return!t&&-1}}},function(t,n,r){var e=r(21),o=Math.max,i=Math.min;t.exports=function(t,n){return(t=e(t))<0?o(t+n,0):i(t,n)}},function(t,n,r){"use strict";var e=r(63),o=r(64),i=r(9),u=r(15);t.exports=r(33)(Array,"Array",function(t,n){this._t=u(t),this._i=0,this._k=n},function(){var t=this._t,n=this._k,r=this._i++;return!t||r>=t.length?(this._t=void 0,o(1)):o(0,"keys"==n?r:"values"==n?t[r]:[r,t[r]])},"values"),i.Arguments=i.Array,e("keys"),e("values"),e("entries")},function(t,n){t.exports=function(){}},function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},function(t,n,r){"use strict";var e=r(49),o=r(25),i=r(17),u={};r(6)(u,r(1)("iterator"),function(){return this}),t.exports=function(t,n,r){t.prototype=e(u,{next:o(1,r)}),i(t,n+" Iterator")}},function(t,n,r){var e=r(21),o=r(20);t.exports=function(t){return function(n,r){var i,u,c=o(n)+"",f=e(r),s=c.length;return f<0||f>=s?t?"":void 0:(i=c.charCodeAt(f))<55296||i>56319||f+1===s||(u=c.charCodeAt(f+1))<56320||u>57343?t?c.charAt(f):i:t?c.slice(f,f+2):u-56320+(i-55296<<10)+65536}}},function(t,n,r){r(44),r(40),r(42),r(68),r(71),r(72),t.exports=r(3).Promise},function(t,n,r){"use strict";var e,o,i,u,c=r(29),f=r(0),s=r(11),a=r(32),l=r(7),p=r(5),v=r(13),h=r(50),d=r(45),y=r(35),x=r(36).set,m=r(69)(),_=r(23),g=r(37),b=r(38),w=f.TypeError,j=f.process,O=f.Promise,S="process"==a(j),P=function(){},T=o=_.f,A=!!function(){try{var t=O.resolve(1),n=(t.constructor={})[r(1)("species")]=function(t){t(P,P)};return(S||"function"==typeof PromiseRejectionEvent)&&t.then(P)instanceof n}catch(t){}}(),M=function(t){var n;return!(!p(t)||"function"!=typeof(n=t.then))&&n},L=function(t,n){if(!t._n){t._n=!0;var r=t._c;m(function(){for(var e=t._v,o=1==t._s,i=0,u=function(n){var r,i,u,c=o?n.ok:n.fail,f=n.resolve,s=n.reject,a=n.domain;try{c?(o||(2==t._h&&F(t),t._h=1),!0===c?r=e:(a&&a.enter(),r=c(e),a&&(a.exit(),u=!0)),r===n.promise?s(w("Promise-chain cycle")):(i=M(r))?i.call(r,f,s):f(r)):s(e)}catch(t){a&&!u&&a.exit(),s(t)}};r.length>i;)u(r[i++]);t._c=[],t._n=!1,n&&!t._h&&E(t)})}},E=function(t){x.call(f,function(){var n,r,e,o=t._v,i=k(t);if(i&&(n=g(function(){S?j.emit("unhandledRejection",o,t):(r=f.onunhandledrejection)?r({promise:t,reason:o}):(e=f.console)&&e.error&&e.error("Unhandled promise rejection",o)}),t._h=S||k(t)?2:1),t._a=void 0,i&&n.e)throw n.v})},k=function(t){return 1!==t._h&&0===(t._a||t._c).length},F=function(t){x.call(f,function(){var n;S?j.emit("rejectionHandled",t):(n=f.onrejectionhandled)&&n({promise:t,reason:t._v})})},C=function(t){var n=this;n._d||(n._d=!0,(n=n._w||n)._v=t,n._s=2,n._a||(n._a=n._c.slice()),L(n,!0))},I=function(t){var n,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===t)throw w("Promise can't be resolved itself");(n=M(t))?m(function(){var e={_w:r,_d:!1};try{n.call(t,s(I,e,1),s(C,e,1))}catch(t){C.call(e,t)}}):(r._v=t,r._s=1,L(r,!1))}catch(t){C.call({_w:r,_d:!1},t)}}};A||(O=function(t){h(this,O,"Promise","_h"),v(t),e.call(this);try{t(s(I,this,1),s(C,this,1))}catch(t){C.call(this,t)}},(e=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=r(53)(O.prototype,{then:function(t,n){var r=T(y(this,O));return r.ok="function"!=typeof t||t,r.fail="function"==typeof n&&n,r.domain=S?j.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&L(this,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new e;this.promise=t,this.resolve=s(I,t,1),this.reject=s(C,t,1)},_.f=T=function(t){return t===O||t===u?new i(t):o(t)}),l(l.G+l.W+l.F*!A,{Promise:O}),r(17)(O,"Promise"),r(70)("Promise"),u=r(3).Promise,l(l.S+l.F*!A,"Promise",{reject:function(t){var n=T(this);return(0,n.reject)(t),n.promise}}),l(l.S+l.F*(c||!A),"Promise",{resolve:function(t){return b(c&&this===u?O:this,t)}}),l(l.S+l.F*!(A&&r(54)(function(t){O.all(t).catch(P)})),"Promise",{all:function(t){var n=this,r=T(n),e=r.resolve,o=r.reject,i=g(function(){var r=[],i=0,u=1;d(t,!1,function(t){var c=i++,f=!1;r.push(void 0),u++,n.resolve(t).then(function(t){f||(f=!0,r[c]=t,--u||e(r))},o)}),--u||e(r)});return i.e&&o(i.v),r.promise},race:function(t){var n=this,r=T(n),e=r.reject,o=g(function(){d(t,!1,function(t){n.resolve(t).then(r.resolve,e)})});return o.e&&e(o.v),r.promise}})},function(t,n,r){var e=r(0),o=r(36).set,i=e.MutationObserver||e.WebKitMutationObserver,u=e.process,c=e.Promise,f="process"==r(14)(u);t.exports=function(){var t,n,r,s=function(){var e,o;for(f&&(e=u.domain)&&e.exit();t;){o=t.fn,t=t.next;try{o()}catch(e){throw t?r():n=void 0,e}}n=void 0,e&&e.enter()};if(f)r=function(){u.nextTick(s)};else if(!i||e.navigator&&e.navigator.standalone)if(c&&c.resolve){var a=c.resolve();r=function(){a.then(s)}}else r=function(){o.call(e,s)};else{var l=!0,p=document.createTextNode("");new i(s).observe(p,{characterData:!0}),r=function(){p.data=l=!l}}return function(e){var o={fn:e,next:void 0};n&&(n.next=o),t||(t=o,r()),n=o}}},function(t,n,r){"use strict";var e=r(0),o=r(3),i=r(10),u=r(8),c=r(1)("species");t.exports=function(t){var n="function"==typeof o[t]?o[t]:e[t];u&&n&&!n[c]&&i.f(n,c,{configurable:!0,get:function(){return this}})}},function(t,n,r){"use strict";var e=r(7),o=r(3),i=r(0),u=r(35),c=r(38);e(e.P+e.R,"Promise",{finally:function(t){var n=u(this,o.Promise||i.Promise),r="function"==typeof t;return this.then(r?function(r){return c(n,t()).then(function(){return r})}:t,r?function(r){return c(n,t()).then(function(){throw r})}:t)}})},function(t,n,r){"use strict";var e=r(7),o=r(23),i=r(37);e(e.S,"Promise",{try:function(t){var n=o.f(this),r=i(t);return(r.e?n.reject:n.resolve)(r.v),n.promise}})},,,,,function(t,n,r){t.exports=r(94)},,,,,,,,,,,,,,,,,function(t,n,r){r(40),r(95),t.exports=r(3).Array.from},function(t,n,r){"use strict";var e=r(11),o=r(7),i=r(39),u=r(51),c=r(52),f=r(27),s=r(96),a=r(43);o(o.S+o.F*!r(54)(function(t){Array.from(t)}),"Array",{from:function(t){var n,r,o,l,p=i(t),v="function"==typeof this?this:Array,h=arguments.length,d=h>1?arguments[1]:void 0,y=void 0!==d,x=0,m=a(p);if(y&&(d=e(d,h>2?arguments[2]:void 0,2)),void 0==m||v==Array&&c(m))for(r=new v(n=f(p.length));n>x;x++)s(r,x,y?d(p[x],x):p[x]);else for(l=m.call(p),r=new v;!(o=l.next()).done;x++)s(r,x,y?u(l,d,[o.value,x],!0):o.value);return r.length=x,r}})},function(t,n,r){"use strict";var e=r(10),o=r(25);t.exports=function(t,n,r){n in t?e.f(t,n,o(0,r)):t[n]=r}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,n,r){"use strict";r.r(n);var e=r(2),o=r.n(e),i=r(77),u=r.n(i),c=r(24),f=r(16);n.default=function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return this.then(function(e){if(!Object(c.a)(e))throw TypeError("findIndexAF cannot be called on ".concat(e,", only on an Array or array-like Object"));if("function"!=typeof t)throw TypeError("".concat(t," is not a function"));var i=u()(e),s=i.length>>>0;return n.inSeries?s?function n(e,i){return o.a.resolve(e[i]).then(function(u){return e[i]=u,o.a.resolve(t.call(r,u,i,e)).then(function(t){return t?i:i===s-1?-1:n(e,i+1)})})}(i,0):-1:Object(f.a)(i,t,r).then(function(t){return t.indexOf(!0)})})}}]).default},"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("findIndexAF",[],n):"object"==typeof exports?exports.findIndexAF=n():t.findIndexAF=n();
//# sourceMappingURL=min.js.map
/*!
* @async-af/findindex/min v6.0.0
* @async-af/findindex/min v7.0.0
*
* AsyncAF (Async/Await Fun) findIndexAF method
* AsyncAF (The asynciest of async libs there ever was or ever will be...AsyncAF!?) findIndexAF method
* (https://async-af.js.org/AsyncAF#findIndexAF)

@@ -12,3 +12,3 @@ *

*/
var e,n;e="undefined"!=typeof self?self:this,n=function(){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=10)}({0:function(e,n,t){"use strict";n.a=function(e){return Array.isArray(e)||null!=e&&null!=e.length}},10:function(e,n,t){"use strict";t.r(n);var r=t(0);n.default=function(e,n){return this.then(t=>{if(!Object(r.a)(t))throw TypeError(`findIndexAF cannot be called on ${t}, only on an Array or array-like Object`);return Array.prototype.findIndex.call(t,e,n)})}}}).default},"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("findIndexAF",[],n):"object"==typeof exports?exports.findIndexAF=n():e.findIndexAF=n();
var e,t;e="undefined"!=typeof self?self:this,t=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=15)}({0:function(e,t,n){"use strict";n.d(t,"b",function(){return o}),n.d(t,"a",function(){return i});var r=n(2);const o=e=>(function t(n,r){const o=n.length;if(!o)return Promise.resolve(n);const i=!(r in e);return Promise.resolve(e[r]).then(e=>(i||(n[r]=e),r===o-1?n:t(n,r+1)))})(Array(e.length>>>0),0),i=(e,t,n)=>Object(r.a)(e,e=>e).then(t?e=>Object(r.a)(Array.prototype.map.call(e,t,n)):void 0)},1:function(e,t,n){"use strict";t.a=function(e){return Array.isArray(e)||null!=e&&null!=e.length}},15:function(e,t,n){"use strict";n.r(t);var r=n(1),o=n(0);t.default=function(e,t){return this.then(n=>{if(!Object(r.a)(n))throw TypeError(`findIndexAF cannot be called on ${n}, only on an Array or array-like Object`);if("function"!=typeof e)throw TypeError(`${e} is not a function`);const i=Array.from(n),u=i.length>>>0;return this.inSeries?u?function n(r,o){return Promise.resolve(r[o]).then(i=>(r[o]=i,Promise.resolve(e.call(t,i,o,r)).then(e=>e?o:o===u-1?-1:n(r,o+1))))}(i,0):-1:Object(o.a)(i,e,t).then(e=>e.indexOf(!0))})}},2:function(e,t,n){"use strict";t.a=(e=>new Promise((t,n)=>{const r=e.length>>>0,o=Array(r);let i=r,u=r;if(!r)return t(o);const f=r=>Promise.resolve(e[r]).then(n=>{r in e&&(o[r]=n),--i||t(o)},n);for(;u--;)f(u)}))}}).default},"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("findIndexAF",[],t):"object"==typeof exports?exports.findIndexAF=t():e.findIndexAF=t();
//# sourceMappingURL=min.js.map

@@ -6,3 +6,3 @@ {

"license": "MIT",
"version": "6.0.0",
"version": "7.0.0",
"homepage": "https://async-af.js.org",

@@ -28,2 +28,5 @@ "bugs": {

"methods",
"parallel",
"series",
"serial",
"map",

@@ -30,0 +33,0 @@ "forEach",

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

Sorry, the diff of this file is too big to display

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc