0.1.3 • Published 6 years ago
string-filter v0.1.3
string-filter
NOTE: string-filter was renamed to @extra-string/filter.
Filter characters that pass the test, like Array.filter()
.
const filter = require('string-filter');
// filter(<string>, <testFn>, [thisArg])
filter('g00df00d', (v) => v<='f');
// '00df00d'
filter('badfood', (v) => v<='f');
// 'badfd'
filter('', (v) => v<='f');
// ''