</>PackageGraphPackageGraph

filter-obj

npmv6.1.0TypeScript

Filter 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.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

6.5 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

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);
Example truncated — see the full README.

filter-obj vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
filter-objthis page15.8M1MIT2 years ago
rfdc46.8M3MIT1 day ago
define-lazy-prop01MIT1 day ago
test-exclude01ISC1 day ago
type-fest337.8M6(MIT OR CC0-1.0)1 day ago
path-key244.9M1MIT1 day ago

Dependencies

Declared by filter-obj v6.1.0. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (3)

ava ^6.1.2tsd ^0.30.7xo ^0.58.0

Used by

Popular packages that depend on filter-obj.

Relationship graph

Dependencies (left) and dependents (right) of filter-obj.

query-stringfilter-obj
filter-obj dependencies dependents

Frequently installed together

Release history

No releases in the last two years, typically about 165 days apart.

Recent versions of filter-obj
VersionPublishedSizeLicense
6.1.0latest2 years ago6.5 KBMIT
6.0.02 years ago6.0 KBMIT
5.1.04 years ago5.8 KBMIT
5.0.04 years ago6.0 KBMIT
4.0.04 years ago5.8 KBMIT
3.0.05 years ago4.1 KBMIT
2.0.25 years ago3.9 KBMIT
2.0.17 years ago4.0 KBMIT
2.0.07 years ago4.1 KBMIT
1.1.011 years agoMIT
1.0.011 years agoMIT

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

Keywords

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.