lodash.indexof
Advanced tools
Comparing version 3.0.2 to 3.0.3
23
index.js
/** | ||
* lodash 3.0.2 (Custom Build) <https://lodash.com/> | ||
* lodash 3.0.3 (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.8.2 <http://underscorejs.org/LICENSE> | ||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> | ||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | ||
@@ -17,11 +17,7 @@ * Available under MIT license <https://lodash.com/license> | ||
* Gets the index at which the first occurrence of `value` is found in `array` | ||
* using `SameValueZero` for equality comparisons. If `fromIndex` is negative, | ||
* it is used as the offset from the end of `array`. If `array` is sorted | ||
* providing `true` for `fromIndex` performs a faster binary search. | ||
* using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) | ||
* for equality comparisons. If `fromIndex` is negative, it is used as the offset | ||
* from the end of `array`. If `array` is sorted providing `true` for `fromIndex` | ||
* performs a faster binary search. | ||
* | ||
* **Note:** `SameValueZero` comparisons are like strict equality comparisons, | ||
* e.g. `===`, except that `NaN` matches `NaN`. See the | ||
* [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) | ||
* for more details. | ||
* | ||
* @static | ||
@@ -56,6 +52,5 @@ * @memberOf _ | ||
} else if (fromIndex) { | ||
var index = binaryIndex(array, value), | ||
other = array[index]; | ||
if (value === value ? (value === other) : (other !== other)) { | ||
var index = binaryIndex(array, value); | ||
if (index < length && | ||
(value === value ? (value === array[index]) : (array[index] !== array[index]))) { | ||
return index; | ||
@@ -62,0 +57,0 @@ } |
{ | ||
"name": "lodash.indexof", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"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.2 | ||
# lodash.indexof v3.0.3 | ||
@@ -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.2-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.3-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
4888
58