{"library":"lodash._basefind","title":"Lodash BaseFind Internal Module","description":"lodash._basefind is an npm package exporting the internal `baseFind` utility function from the Lodash v3 codebase. This package was part of an older modularization strategy for Lodash, allowing developers to import specific internal functions as standalone Node.js/io.js modules. The `baseFind` function is a core internal utility responsible for iterating over collections to find the first element that satisfies a given predicate, forming the basis for higher-level functions like `_.find`. While the main Lodash library has advanced significantly to version 4.x (currently 4.18.x), this specific package remains at version 3.0.0. Its original purpose has largely been superseded by modern tree-shaking capabilities in bundlers and direct imports from `lodash-es` for ESM environments, rendering this package effectively abandoned and no longer actively maintained.","language":"javascript","status":"abandoned","last_verified":"Tue Apr 21","install":{"commands":["npm install lodash._basefind"],"cli":null},"imports":["const baseFind = require('lodash._basefind');","const baseFind = require('lodash._basefind');\n// Usage:\nbaseFind(collection, predicate);","import { find as baseFind } from 'lodash'; // Accessing the type definition for `find`"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const baseFind = require('lodash._basefind');\n\nconst users = [\n  { 'user': 'barney', 'age': 36, 'active': true },\n  { 'user': 'fred', 'age': 40, 'active': false },\n  { 'user': 'pebbles', 'age': 1, 'active': true }\n];\n\n// Find the first user who is active\nconst activeUser = baseFind(users, function(o) { return o.active; });\nconsole.log('Found active user:', activeUser); // Expected: { 'user': 'barney', 'age': 36, 'active': true }\n\n// Find the first user older than 38\nconst olderUser = baseFind(users, { 'age': 40 });\nconsole.log('Found user aged 40:', olderUser); // Expected: { 'user': 'fred', 'age': 40, 'active': false }\n\n// If no match is found\nconst nonExistent = baseFind(users, { 'age': 99 });\nconsole.log('Found non-existent user:', nonExistent); // Expected: undefined","lang":"javascript","description":"Demonstrates how to import and use the internal `baseFind` function to locate elements in a collection based on a predicate or property match, analogous to `_.find` in the main Lodash library.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}