0.1.2 • Published 6 years ago

set-findall v0.1.2

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

set-findall

NOTE: set-findall was renamed to @extra-set/find-all. NPM

Get all values in set that satisfy the test, like Array.find().

const findAll = require('set-findall');
// findAll(<set>, <test function>, [this], [target=new Set()])
 
var set = new Set('scout');
findAll(set, (v) => v>'s');
// Set {'u', 't'}
findAll(set, (v, k, set) => v>='s', null);
// Set {'s', 'u', 't'}
findAll(set, (v, k, set) => v>='s', null, new Set(['z']));
// Set {'z', 's', 'u', 't'}
findAll(set, (v, k, set) => v>='s', null, set);
// Set {'s', 'u', 't'} (set is modified)
0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago