each-string-index
v0.2.2
Published
Get the index for each occurrence of a string, in a string. Much faster than regex, and useful for doing simple find and replace operations for specific strings.
Downloads
3
Readme
each-string-index
Get the index for each occurrence of a string, in a string. Much faster than regex, and useful for doing simple find and replace operations for specific strings.
Install with npm
npm i each-string-index --save
Usage
var each = require('each-string-index');
eachIndex('b', 'a b c d b e b f');
//=> [2, 8, 12]
eachIndex('b', 'bb c d b e b f');
//=> [0, 1, 7, 11]
Author
Jon Schlinkert
License
Copyright (c) 2015 Jon Schlinkert
Released under the MIT license
This file was generated by verb on February 26, 2015.