NPM Smell 🍑💨

trivial and outdated NPM packages

array-filter outdated npm logo

Reimplements the native Array.prototype.filter() method.

Weekly Downloads
1,141,661
Dependencies
0
Latest Release
9 years ago
This dependency re-creates a native JavaScript API. It is recommended to use the native API instead
Outdated
natively supported
since 11 years (chrome, firefox, safari, nodejs)

About

This dependency reimplents the native Array.prototype.filter() method. It is supported by all modern browsers and Node.js versions since about 11 years.

The Array.prototype.filter() method creates a new array with all elements that pass the test implemented by the provided function.

// Show all elements that are greater than 10
const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
const filtered = arr.filter(element => element > 10);
console.log(filtered); // []