🚀 Launch Week Day 3:Introducing Supply Chain Attack Campaigns Tracking.Learn More →
Socket
Book a DemoInstallSign in
Socket

each-string-index

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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.

latest
Source
npmnpm
Version
0.2.2
Version published
Maintainers
1
Created
Source

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.

Keywords

each

FAQs

Package last updated on 27 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts