0.1.2 • Published 6 years ago
set-find v0.1.2
set-find
NOTE: set-find was renamed to @extra-set/find.
Get first value in set that satisfies the test, like Array.find().
const find = require('set-find');
// find(<set>, <test function>, [this])
find(new Set('jack'), (v) => v<='f');
// 'a'
find(new Set('jill'), (v, k, set) => v<='f', null);
// undefined