3.2.0 • Published 1 year ago

just-filter-object v3.2.0

Weekly downloads
334
License
MIT
Repository
github
Last release
1 year ago

just-filter-object

Part of a library of zero-dependency npm modules that do just do one thing. Guilt-free utilities for every occasion.

🍦 Try it

npm install just-filter-object
yarn add just-filter-object

Filter an object

import filter from 'just-filter';

// returns a new object containing those original properties for which the predicate returns truthy
filter({a: 3, b: 5, c: 9}, (key, value) => value < 6); // {a: 3, b: 5}
filter({a1: 3, b1: 5, a2: 9}, (key, value) => key[0] == 'a'); // {a1: 3, a2: 9}
filter({a: 3, b: 5, c: null}, (key, value) => value); // {a: 3, b: 5}
3.2.0

1 year ago

3.1.1

2 years ago

3.1.0

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

2.1.1

3 years ago

2.1.0

3 years ago

2.0.0

3 years ago

1.3.0

3 years ago

1.2.0

6 years ago

1.1.22

8 years ago

1.1.21

8 years ago

1.1.20

8 years ago

1.1.19

8 years ago