filter-obj
npmv6.1.0TypeScriptFilter object keys and values into a new object
Adopt with care
filter-obj is usable, with caveats. Last published 835 days ago.
- AAdoption: grade A, Excellent.
15.8M downloads per week and 1 known dependents.
- DMaintenance: grade D, Poor — a real concern.
Last published 835 days ago.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 6.5 KB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding filter-obj to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- node >=18
- Module format
- ESM only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the filter-obj README.
import {includeKeys, excludeKeys} from 'filter-obj';
const object = {
foo: true,
bar: false
};
const newObject = includeKeys(object, (key, value) => value === true);
//=> {foo: true}
const newObject2 = includeKeys(object, ['bar']);
//=> {bar: false}
const newObject = excludeKeys(object, (key, value) => value === true);filter-obj vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| filter-objthis page | 15.8M | 1 | MIT | 2 years ago |
| rfdc | 46.8M | 3 | MIT | 1 day ago |
| define-lazy-prop | 0 | 1 | MIT | 1 day ago |
| test-exclude | 0 | 1 | ISC | 1 day ago |
| type-fest | 337.8M | 6 | (MIT OR CC0-1.0) | 1 day ago |
| path-key | 244.9M | 1 | MIT | 1 day ago |
Dependencies
Declared by filter-obj v6.1.0. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (3)
Used by
Popular packages that depend on filter-obj.
Relationship graph
Dependencies (left) and dependents (right) of filter-obj.
Frequently installed together
Release history
No releases in the last two years, typically about 165 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 6.1.0latest | 2 years ago | 6.5 KB | MIT |
| 6.0.0 | 2 years ago | 6.0 KB | MIT |
| 5.1.0 | 4 years ago | 5.8 KB | MIT |
| 5.0.0 | 4 years ago | 6.0 KB | MIT |
| 4.0.0 | 4 years ago | 5.8 KB | MIT |
| 3.0.0 | 5 years ago | 4.1 KB | MIT |
| 2.0.2 | 5 years ago | 3.9 KB | MIT |
| 2.0.1 | 7 years ago | 4.0 KB | MIT |
| 2.0.0 | 7 years ago | 4.1 KB | MIT |
| 1.1.0 | 11 years ago | — | MIT |
| 1.0.0 | 11 years ago | — | MIT |
Overview
filter-obj is an npm package that filter object keys and values into a new object. It is extremely widely used, with about 15.8M downloads per week and 1 known dependents in the graph. The latest version is 6.1.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need filter object keys and values into a new object and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (15.8M weekly downloads).
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
- Lean dependency tree (3 direct dependencies).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Funding
Frequently asked questions
Should I use filter-obj?
filter-obj is usable, with caveats. Last published 835 days ago.
How do I install filter-obj?
Run `npm install filter-obj` to add filter-obj to your npm project.
What license is filter-obj released under?
filter-obj is distributed under the MIT license.
How popular is filter-obj?
filter-obj has approximately 15,800,404 downloads per week and 1 known dependent packages.
Is filter-obj still maintained?
The most recent release of filter-obj (v6.1.0) was published 2 years ago.
Does filter-obj run install scripts?
No. filter-obj does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.