Package Exports
- index-of
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (index-of) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
index-of 
Get the index of the first element in an array that returns truthy for the given value, using strict equality for comparisons.
Install
Install with npm
$ npm i index-of --saveInstall with bower
$ bower install index-of --saveUsage
var indexOf = require('index-of');
indexOf(['a', 'b', 'c'], 'b');
//=> 1
indexOf(['a', 'b', 'c'], 'd');
//=> -1
indexOf(['a', 'b', 'c', 'a', 'b', 'c'], 'b', 2);
//=> 4Related projects
Other object utils:
- array-every: Returns true if the callback returns truthy for all elements in the given array.
- array-slice: Array-slice method. Slices
arrayfrom thestartindex up to, but not including, theend… more - array-unique: Return an array free of duplicate values. Fastest ES5 implementation.
- filter-array: Iterates over the elements in an array, returning an array with only the elements for… more
Running tests
Install dev dependencies:
$ npm i -d && npm testContributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Author
Jon Schlinkert
License
Copyright © 2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb-cli on June 22, 2015.