{"library":"lodash._basefindindex","title":"Lodash Internal `baseFindIndex` Module (v3.6.0)","description":"This package, `lodash._basefindindex`, provides a standalone CommonJS module for the internal `baseFindIndex` function from Lodash version 3.6.0. This function is an integral part of Lodash's core, designed to find the index of an element within a collection using a predicate, without directly exposing it as a public API method. In its original context, such modular builds allowed for more granular imports and smaller bundle sizes before widespread adoption of ES Modules and advanced tree-shaking capabilities. However, the main Lodash library is now at version 4.18.1, with its v3.x line officially reaching end-of-life in January 2016. Consequently, `lodash._basefindindex` (v3.6.0) is considered an abandoned, legacy package, and its use is generally discouraged in modern JavaScript development in favor of the full `lodash` or `lodash-es` packages, which benefit from active maintenance and regular security updates.","language":"javascript","status":"abandoned","last_verified":"Sun Apr 19","install":{"commands":["npm install lodash._basefindindex"],"cli":null},"imports":["const baseFindIndex = require('lodash._basefindindex');","import { findIndex } from 'lodash-es';\n// OR\nimport findIndex from 'lodash/findIndex';","const _ = require('lodash');\n_.findIndex(array, predicate);"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const baseFindIndex = require('lodash._basefindindex');\n\nconst users = [\n  { 'user': 'barney', 'active': false },\n  { 'user': 'fred',   'active': false },\n  { 'user': 'pebbles', 'active': true }\n];\n\n// Find the index of the first active user\nconst predicate = (o) => o.active;\nconst index = baseFindIndex(users, predicate, 0, false);\n\nconsole.log(`Index of first active user: ${index}`);\n\n// Example of how you would use the modern public API (not this package)\nconst _ = require('lodash');\nconst modernIndex = _.findIndex(users, predicate);\nconsole.log(`Index using modern _.findIndex: ${modernIndex}`);","lang":"javascript","description":"Demonstrates how to import and use the `baseFindIndex` function from this legacy module. It also contrasts it with the equivalent public API usage in modern Lodash.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}