Lodash Internal Array Filter

3.0.0 · abandoned · verified Sun Apr 19

This package, `lodash._arrayfilter`, provides a modularized, internal implementation of `arrayFilter` originally part of the Lodash v3 ecosystem. Released around 2014-2015, this version (`3.0.0`) predates the significant breaking changes and API refinements introduced with Lodash v4 (currently at `4.18.1`). While the main `lodash` library continues active development with a steady release cadence, `lodash._arrayfilter` as a standalone module is no longer actively maintained. Its original purpose was to allow granular imports of internal Lodash utilities for specific environments, a need largely superseded by modern JavaScript bundlers offering robust tree-shaking capabilities for the complete `lodash` package. It is a CommonJS-only module and is primarily compatible with other Lodash v3 components, making it largely unsuitable for contemporary projects using `lodash` v4+ or ES modules. Key differentiators at its time included extreme modularity for internal functions, but this approach is now considered legacy.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates how to import and use the internal `arrayFilter` function from this legacy Lodash v3 module using CommonJS.

const arrayFilter = require('lodash._arrayfilter');

const users = [
  { 'user': 'barney', 'age': 36, 'active': true },
  { 'user': 'fred',   'age': 40, 'active': false },
  { 'user': 'pebbles', 'age': 1, 'active': true }
];

// This is an internal utility and might have specific expectations.
// For general use, prefer Array.prototype.filter or the main lodash `_.filter` (v4+).
const activeUsers = arrayFilter(users, (user) => user.active);

console.log(activeUsers);
// Expected output:
// [ { user: 'barney', age: 36, active: true }, { user: 'pebbles', age: 1, active: true } ]

view raw JSON →