lodash.indexof
Advanced tools
Comparing version 3.0.0 to 3.0.1
16
index.js
/** | ||
* lodash 3.0.0 (Custom Build) <https://lodash.com/> | ||
* lodash 3.0.1 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modern modularize exports="npm" -o ./` | ||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> | ||
* Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE> | ||
* Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE> | ||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | ||
@@ -36,11 +36,11 @@ * Available under MIT license <https://lodash.com/license> | ||
* | ||
* _.indexOf([1, 2, 3, 1, 2, 3], 2); | ||
* _.indexOf([1, 2, 1, 2], 2); | ||
* // => 1 | ||
* | ||
* // using `fromIndex` | ||
* _.indexOf([1, 2, 3, 1, 2, 3], 2, 3); | ||
* // => 4 | ||
* _.indexOf([1, 2, 1, 2], 2, 2); | ||
* // => 3 | ||
* | ||
* // performing a binary search | ||
* _.indexOf([4, 4, 5, 5, 6, 6], 5, true); | ||
* _.indexOf([1, 1, 2, 2], 2, true); | ||
* // => 2 | ||
@@ -54,3 +54,3 @@ */ | ||
if (typeof fromIndex == 'number') { | ||
fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0); | ||
fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex; | ||
} else if (fromIndex) { | ||
@@ -62,5 +62,5 @@ var index = binaryIndex(array, value), | ||
} | ||
return baseIndexOf(array, value, fromIndex); | ||
return baseIndexOf(array, value, fromIndex || 0); | ||
} | ||
module.exports = indexOf; |
{ | ||
"name": "lodash.indexof", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "The modern build of lodash’s `_.indexOf` as a module.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://lodash.com/", |
@@ -1,2 +0,2 @@ | ||
# lodash.indexof v3.0.0 | ||
# lodash.indexof v3.0.1 | ||
@@ -20,2 +20,2 @@ The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.indexOf` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. | ||
See the [documentation](https://lodash.com/docs#indexOf) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.indexof) for more details. | ||
See the [documentation](https://lodash.com/docs#indexOf) or [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash.indexof) for more details. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5024