0.1.0 • Published 9 years ago

last-index-of v0.1.0

Weekly downloads
1
License
-
Repository
github
Last release
9 years ago

last-index-of NPM version

Get the index of the last element in an array that returns truthy for the given value, using strict equality for comparisons.

Install with npm

npm i last-index-of --save

Usage

var lastIndexOf = require('last-index-of');

lastIndexOf(['a', 'b', 'c', 'a', 'b', 'c'], 'a');
//=> 3

lastIndexOf(['a', 'b', 'c'], 'd');
//=> -1

lastIndexOf(['a', 'b', 'a', 'b', 'a', 'b'], 'b', 3);
//=> 3

Run tests

npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Jon Schlinkert

License

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


This file was generated by verb on December 12, 2014. To update, run npm i -g verb && verb.