Skip to content

desoares1975/every-index-of

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

every-index-of

Simple piece of code tha returns every occurence of a single character in a string by it index.

Installation

$ npm install every-index-of

Usage

var evrIndex = require('every-index-of');

let all;

evrIndex('m', 'Common', (err, indexes)=>{
	if (err) { throw err; }

	all = indexes;
})

Should return an array like so:

[2, 3]

#Or the case sensitive vertion:

var evrIndex = require('every-index-of');

let all;

evrIndex('M', 'Common', true, (err, indexes)=>{
    if (err) { throw err; }

    all = indexes;
})

Should return:

-1

Features

  • Case insensetive
  • return -1 if there are no occurences

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published