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 3.5.0 to 4.0.0

esm/index.js

33

index.js
/*!
* AsyncAF (async/await fun)
* @async-af/findindex v4.0.0
*
* @async-af/findIndex v3.5.0
* AsyncAF (Async/Await Fun) findIndexAF method
* (https://async-af.js.org/AsyncAF#findIndexAF)
*
* Copyright (c) 2017-present, Scott Rudiger (https://github.com/ScottRudiger)
*
* This source code is licensed under the MIT license found in this library's GitHub repository (https://github.com/AsyncAF/AsyncAF/blob/master/LICENSE).
* This source code is licensed under the MIT license found in this library's
* GitHub repository (https://github.com/AsyncAF/AsyncAF/blob/master/LICENSE).
*/

@@ -14,7 +16,7 @@ (function webpackUniversalModuleDefinition(root, factory) {

else if(typeof define === 'function' && define.amd)
define("@async-af/findIndex", [], factory);
define("findIndexAF", [], factory);
else if(typeof exports === 'object')
exports["@async-af/findIndex"] = factory();
exports["findIndexAF"] = factory();
else
root["async-af"] = root["async-af"] || {}, root["async-af"]["@async-af/findIndex"] = factory();
root["findIndexAF"] = factory();
})(typeof self !== 'undefined' ? self : this, function() {

@@ -113,2 +115,15 @@ return /******/ (function(modules) { // webpackBootstrap

/***/ "./lib/methods/_internal/permissiveIsArrayLike.js":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
const permissiveIsArrayLike = function permissiveIsArrayLike(obj) {
return Array.isArray(obj) || obj != null && obj.length != null;
};
/* harmony default export */ __webpack_exports__["default"] = (permissiveIsArrayLike);
/***/ }),
/***/ "./lib/methods/arrays/findIndexAF.js":

@@ -120,4 +135,6 @@ /***/ (function(module, __webpack_exports__, __webpack_require__) {

/* harmony import */ var _internal_commonCallback__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./lib/methods/_internal/commonCallback.js");
/* harmony import */ var _internal_permissiveIsArrayLike__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./lib/methods/_internal/permissiveIsArrayLike.js");
// eslint-disable-line no-unused-vars
/**

@@ -151,4 +168,4 @@ * returns the index of the first element in the array that satisfies the provided callback function; otherwise, `-1`

return this.then(arr => {
if (!Array.isArray(arr)) throw TypeError(`findIndexAF called on ${arr}; findIndexAF can only be called on an array`);
return arr.findIndex(callback, thisArg);
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);
});

@@ -155,0 +172,0 @@ };

/*!
* AsyncAF (async/await fun)
* @async-af/findindex/legacy v4.0.0
*
* @async-af/findIndex v3.5.0
* AsyncAF (Async/Await Fun) findIndexAF method
* (https://async-af.js.org/AsyncAF#findIndexAF)
*
* Copyright (c) 2017-present, Scott Rudiger (https://github.com/ScottRudiger)
*
* This source code is licensed under the MIT license found in this library's GitHub repository (https://github.com/AsyncAF/AsyncAF/blob/master/LICENSE).
* This source code is licensed under the MIT license found in this library's
* GitHub repository (https://github.com/AsyncAF/AsyncAF/blob/master/LICENSE).
*/

@@ -14,7 +16,7 @@ (function webpackUniversalModuleDefinition(root, factory) {

else if(typeof define === 'function' && define.amd)
define("@async-af/findIndex", [], factory);
define("findIndexAF", [], factory);
else if(typeof exports === 'object')
exports["@async-af/findIndex"] = factory();
exports["findIndexAF"] = factory();
else
root["async-af"] = root["async-af"] || {}, root["async-af"]["@async-af/findIndex"] = factory();
root["findIndexAF"] = factory();
})(typeof self !== 'undefined' ? self : this, function() {

@@ -113,2 +115,15 @@ return /******/ (function(modules) { // webpackBootstrap

/***/ "./lib/methods/_internal/permissiveIsArrayLike.js":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
var permissiveIsArrayLike = function permissiveIsArrayLike(obj) {
return Array.isArray(obj) || obj != null && obj.length != null;
};
/* harmony default export */ __webpack_exports__["default"] = (permissiveIsArrayLike);
/***/ }),
/***/ "./lib/methods/arrays/findIndexAF.js":

@@ -120,4 +135,6 @@ /***/ (function(module, __webpack_exports__, __webpack_require__) {

/* harmony import */ var _internal_commonCallback__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./lib/methods/_internal/commonCallback.js");
/* harmony import */ var _internal_permissiveIsArrayLike__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./lib/methods/_internal/permissiveIsArrayLike.js");
// eslint-disable-line no-unused-vars
/**

@@ -152,4 +169,4 @@ * returns the index of the first element in the array that satisfies the provided callback function; otherwise, `-1`

return this.then(function (arr) {
if (!Array.isArray(arr)) throw TypeError("findIndexAF called on ".concat(arr, "; findIndexAF can only be called on an array"));
return arr.findIndex(callback, thisArg);
if (!Object(_internal_permissiveIsArrayLike__WEBPACK_IMPORTED_MODULE_1__["default"])(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, thisArg);
});

@@ -156,0 +173,0 @@ };

/*!
* AsyncAF (async/await fun)
* @async-af/findindex/legacy/min v4.0.0
*
* @async-af/findIndex v3.5.0
* AsyncAF (Async/Await Fun) findIndexAF method
* (https://async-af.js.org/AsyncAF#findIndexAF)
*
* Copyright (c) 2017-present, Scott Rudiger (https://github.com/ScottRudiger)
*
* This source code is licensed under the MIT license found in this library's GitHub repository (https://github.com/AsyncAF/AsyncAF/blob/master/LICENSE).
* This source code is licensed under the MIT license found in this library's
* GitHub repository (https://github.com/AsyncAF/AsyncAF/blob/master/LICENSE).
*/
!function webpackUniversalModuleDefinition(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("@async-af/findIndex",[],r):"object"==typeof exports?exports["@async-af/findIndex"]=r():(e["async-af"]=e["async-af"]||{},e["async-af"]["@async-af/findIndex"]=r())}("undefined"!=typeof self?self:this,function(){return function(e){var r={};function __webpack_require__(n){if(r[n])return r[n].exports;var _=r[n]={i:n,l:!1,exports:{}};return e[n].call(_.exports,_,_.exports,__webpack_require__),_.l=!0,_.exports}return __webpack_require__.m=e,__webpack_require__.c=r,__webpack_require__.d=function(e,r,n){__webpack_require__.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.n=function(e){var r=e&&e.__esModule?function getDefault(){return e.default}:function getModuleExports(){return e};return __webpack_require__.d(r,"a",r),r},__webpack_require__.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=138)}({138:function(e,r,n){"use strict";n.r(r),r.default=function findIndexAF(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return this.then(function(n){if(!Array.isArray(n))throw TypeError("findIndexAF called on ".concat(n,"; findIndexAF can only be called on an array"));return n.findIndex(e,r)})}}}).default});
!function webpackUniversalModuleDefinition(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("findIndexAF",[],r):"object"==typeof exports?exports.findIndexAF=r():e.findIndexAF=r()}("undefined"!=typeof self?self:this,function(){return function(e){var r={};function __webpack_require__(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,__webpack_require__),t.l=!0,t.exports}return __webpack_require__.m=e,__webpack_require__.c=r,__webpack_require__.d=function(e,r,n){__webpack_require__.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.n=function(e){var r=e&&e.__esModule?function getDefault(){return e.default}:function getModuleExports(){return e};return __webpack_require__.d(r,"a",r),r},__webpack_require__.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=141)}({141:function(e,r,n){"use strict";n.r(r);var t=n(3);r.default=function findIndexAF(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return this.then(function(n){if(!Object(t.a)(n))throw TypeError("findIndexAF cannot be called on ".concat(n,", only on an Array or array-like Object"));return Array.prototype.findIndex.call(n,e,r)})}},3:function(e,r,n){"use strict";r.a=function permissiveIsArrayLike(e){return Array.isArray(e)||null!=e&&null!=e.length}}}).default});
//# sourceMappingURL=min.js.map
/*!
* AsyncAF (async/await fun)
* @async-af/findindex/min v4.0.0
*
* @async-af/findIndex v3.5.0
* AsyncAF (Async/Await Fun) findIndexAF method
* (https://async-af.js.org/AsyncAF#findIndexAF)
*
* Copyright (c) 2017-present, Scott Rudiger (https://github.com/ScottRudiger)
*
* This source code is licensed under the MIT license found in this library's GitHub repository (https://github.com/AsyncAF/AsyncAF/blob/master/LICENSE).
* This source code is licensed under the MIT license found in this library's
* GitHub repository (https://github.com/AsyncAF/AsyncAF/blob/master/LICENSE).
*/
!function webpackUniversalModuleDefinition(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("@async-af/findIndex",[],r):"object"==typeof exports?exports["@async-af/findIndex"]=r():(e["async-af"]=e["async-af"]||{},e["async-af"]["@async-af/findIndex"]=r())}("undefined"!=typeof self?self:this,function(){return function(e){var r={};function __webpack_require__(n){if(r[n])return r[n].exports;var _=r[n]={i:n,l:!1,exports:{}};return e[n].call(_.exports,_,_.exports,__webpack_require__),_.l=!0,_.exports}return __webpack_require__.m=e,__webpack_require__.c=r,__webpack_require__.d=function(e,r,n){__webpack_require__.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.n=function(e){var r=e&&e.__esModule?function getDefault(){return e.default}:function getModuleExports(){return e};return __webpack_require__.d(r,"a",r),r},__webpack_require__.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=3)}({3:function(e,r,n){"use strict";n.r(r),r.default=function findIndexAF(e,r){return this.then(n=>{if(!Array.isArray(n))throw TypeError(`findIndexAF called on ${n}; findIndexAF can only be called on an array`);return n.findIndex(e,r)})}}}).default});
!function webpackUniversalModuleDefinition(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("findIndexAF",[],r):"object"==typeof exports?exports.findIndexAF=r():e.findIndexAF=r()}("undefined"!=typeof self?self:this,function(){return function(e){var r={};function __webpack_require__(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,__webpack_require__),t.l=!0,t.exports}return __webpack_require__.m=e,__webpack_require__.c=r,__webpack_require__.d=function(e,r,n){__webpack_require__.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.n=function(e){var r=e&&e.__esModule?function getDefault(){return e.default}:function getModuleExports(){return e};return __webpack_require__.d(r,"a",r),r},__webpack_require__.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=6)}({0:function(e,r,n){"use strict";r.a=function permissiveIsArrayLike(e){return Array.isArray(e)||null!=e&&null!=e.length}},6:function(e,r,n){"use strict";n.r(r);var t=n(0);r.default=function findIndexAF(e,r){return this.then(n=>{if(!Object(t.a)(n))throw TypeError(`findIndexAF cannot be called on ${n}, only on an Array or array-like Object`);return Array.prototype.findIndex.call(n,e,r)})}}}).default});
//# sourceMappingURL=min.js.map
{
"name": "@async-af/findindex",
"description": "standalone AsyncAF package: findIndexAF (https://async-af.js.org/AsyncAF.html#findIndexAF)",
"description": "standalone AsyncAF package: findIndexAF (https://async-af.js.org/AsyncAF#findIndexAF)",
"author": "Scott Rudiger (https://github.com/ScottRudiger)",
"license": "MIT",
"version": "3.5.0",
"version": "4.0.0",
"homepage": "https://async-af.js.org",

@@ -21,2 +21,4 @@ "bugs": {

"async/await",
"Promise",
"Promises",
"library",

@@ -40,6 +42,6 @@ "array",

"shift",
"splice",
"toString"
"splice"
],
"main": "index.js",
"module": "esm/index.js",
"files": [

@@ -49,2 +51,3 @@ "index*",

"legacy/**",
"esm/**",
"README.md"

@@ -51,0 +54,0 @@ ],

# @async-af/findindex
This is the standalone AsyncAF package for findIndexAF. Check out the docs for [usage](https://async-af.js.org/AsyncAF.html#findIndexAF) or take a look at the main AsyncAF [README](https://github.com/AsyncAF/AsyncAF/blob/master/README.md).
This is the standalone [`AsyncAF`](https://async-af.js.org/AsyncAF) package for [`findIndexAF`](https://async-af.js.org/AsyncAF#findIndexAF).
### For more information:
- check out the docs for [`findIndexAF`](https://async-af.js.org/AsyncAF#findIndexAF)
- see how to make use of findIndexAF and other `@async-af/*` scoped packages in the docs for
- [`AsyncAfWrapper`](https://async-af.js.org/AsyncAfWrapper)
- and the [`use`](https://async-af.js.org/AsyncAfWrapper#use) method
- or for more general setup, take a look at the main [AsyncAF README](https://github.com/AsyncAF/AsyncAF/blob/master/README.md)

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