0.2.2 • Published 9 years ago

each-string-index v0.2.2

Weekly downloads
5
License
MIT
Repository
github
Last release
9 years ago

each-string-index NPM version Build Status

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.