{"library":"lodash.where","title":"lodash.where module","description":"The `lodash.where` package provides a standalone module for the `_.where` function, as it existed in Lodash v3.x. This function facilitated filtering collections (arrays of objects) based on an object of properties, returning all matching elements. The package itself is at version 3.1.0 and was last published over 11 years ago, corresponding to the Lodash v3 major release cycle. The `_.where` function was officially deprecated and removed in Lodash v4.0.0, which shifted towards more functional programming paradigms and standardized methods like `_.filter` combined with `_.matches` for equivalent functionality. This package is no longer maintained, does not receive updates (including security patches), and is incompatible with modern JavaScript module systems like ESM without a CommonJS interop layer. The primary Lodash library is currently in its 4.x series (e.g., 4.18.1) and follows a stable but slower release cadence since around 2020.","language":"javascript","status":"abandoned","last_verified":"Sun Apr 19","install":{"commands":["npm install lodash.where"],"cli":null},"imports":["const where = require('lodash.where');"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const where = require('lodash.where');\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\nconst activeUsers = where(users, { 'active': true });\nconsole.log('Active Users:', activeUsers);\n// Expected: [ { user: 'barney', age: 36, active: true }, { user: 'pebbles', age: 1, active: true } ]\n\nconst oldInactiveUser = where(users, { 'age': 40, 'active': false });\nconsole.log('Old Inactive User:', oldInactiveUser);\n// Expected: [ { user: 'fred', age: 40, active: false } ]\n\nconst noMatch = where(users, { 'name': 'invalid' });\nconsole.log('No Match:', noMatch);\n// Expected: []","lang":"javascript","description":"Demonstrates how to import and use the `_.where` function to filter an array of objects based on a property matcher.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}