0.1.3 • Published 6 years ago
string-findindex v0.1.3
string-findindex
NOTE: string-findindex was renamed to @extra-string/find-index.
Get index of first value that satisfies the test, like Array.findIndex()
.
const findIndex = require('string-findindex');
// findIndex(<string>, <testFn>, [thisArg])
findIndex('badd0g', (v) => v>'f');
// 5
findIndex('badcab', (v) => v>'f');
// -1
findIndex('', (v) => v>'f');
// -1