{"library":"lodash._baseindexof","title":"Lodash Internal baseIndexOf Function (Legacy)","description":"The `lodash._baseindexof` package provides a standalone CommonJS module for Lodash's internal `baseIndexOf` utility, primarily intended for use within the Lodash v3 ecosystem. This function performs a basic index search within arrays. While it served a purpose in older modular builds of Lodash (stable at v3.1.0 for this package), modern Lodash (currently at v4.18.1 for the main `lodash` package, which has an active, regular release cadence) has transitioned away from these deeply internal, single-function packages. Developers are now encouraged to use direct imports from `lodash` (e.g., `import { indexOf } from 'lodash'`) or `lodash-es` for better tree-shaking and ESM compatibility. This specific package is no longer actively maintained or updated, making it functionally deprecated.","language":"javascript","status":"deprecated","last_verified":"Sun Apr 19","install":{"commands":["npm install lodash._baseindexof"],"cli":null},"imports":["const baseIndexOf = require('lodash._baseindexof');","import { indexOf } from 'lodash';","import indexOf from 'lodash/indexOf';"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const baseIndexOf = require('lodash._baseindexof');\n\n// Example usage of baseIndexOf, which is similar to Array.prototype.indexOf\nconst numbers = [10, 20, 30, 40, 20];\n\nconsole.log('Finding 30:', baseIndexOf(numbers, 30, 0)); // Expected: 2\nconsole.log('Finding 20 from index 2:', baseIndexOf(numbers, 20, 2)); // Expected: 4\nconsole.log('Finding 50 (not found):', baseIndexOf(numbers, 50, 0)); // Expected: -1\n\nconst objects = [{ id: 1 }, { id: 2 }, { id: 1 }];\n// Note: baseIndexOf performs strict equality (===), so it won't work for objects directly.\nconsole.log('Finding {id:1} (object equality):', baseIndexOf(objects, { id: 1 }, 0)); // Expected: -1\n\nconsole.log('This module is part of Lodash v3 and uses CommonJS `require`.');\nconsole.log('For modern applications, consider `import { indexOf } from \"lodash\"` or `lodash-es`.');","lang":"javascript","description":"Demonstrates how to import and use the `baseIndexOf` function from this legacy CommonJS module, highlighting its strict equality comparison.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}