A lightweight Node.js utility for filtering arrays by type, regex/string pattern, empty values, or duplicates. Version 1.1.2 (last updated in 2016) is the latest stable release. It provides functions like typeAccept, patternAccept, emptyReject, duplicateReject, and patternReject. Compared to lodash or ramda, it is minimal and focused on filtering only, but is no longer actively maintained. Suitable for small projects or legacy codebases running Node >=4.
npm install arrayfilterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates creating filter functions with arrayfilter and applying them to an array.
Consider using lodash's filter or native Array.filter with custom logic.
Use patternAccept(/^[0-9]+$/) or additional NaN check if needed.
Use a deduplication library like lodash.uniqWith for deep comparison.
Use arrayfilter.patternAccept(new RegExp('fo')) or /fo/.Use const arrayfilter = require('arrayfilter'); then arrayfilter.typeAccept.Run 'npm install arrayfilter' in your project directory.
Use arrayfilter.duplicateReject() (note the 'c' in 'duplicate').
No dependency data recorded yet.