npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

each-string-index

0.2.2

@jonschlinkert

npmHomeRepoSnykSocket
Downloads:0
$ npm install each-string-index
DailyWeeklyMonthlyYearly

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

  • github/jonschlinkert
  • twitter/jonschlinkert

License

Copyright (c) 2015 Jon Schlinkert
Released under the MIT license


This file was generated by verb on February 26, 2015.