lodash.indexof
Advanced tools
Comparing version 4.0.4 to 4.0.5
45
index.js
@@ -16,5 +16,3 @@ /** | ||
/** `Object#toString` result references. */ | ||
var funcTag = '[object Function]', | ||
genTag = '[object GeneratorFunction]', | ||
symbolTag = '[object Symbol]'; | ||
var symbolTag = '[object Symbol]'; | ||
@@ -41,3 +39,3 @@ /** Used to match leading and trailing whitespace. */ | ||
* @private | ||
* @param {Array} array The array to search. | ||
* @param {Array} array The array to inspect. | ||
* @param {Function} predicate The function invoked per iteration. | ||
@@ -64,3 +62,3 @@ * @param {number} fromIndex The index to search from. | ||
* @private | ||
* @param {Array} array The array to search. | ||
* @param {Array} array The array to inspect. | ||
* @param {*} value The value to search for. | ||
@@ -101,3 +99,3 @@ * @param {number} fromIndex The index to search from. | ||
* Used to resolve the | ||
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) | ||
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) | ||
* of values. | ||
@@ -112,3 +110,3 @@ */ | ||
* Gets the index at which the first occurrence of `value` is found in `array` | ||
* using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) | ||
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) | ||
* for equality comparisons. If `fromIndex` is negative, it's used as the | ||
@@ -121,3 +119,3 @@ * offset from the end of `array`. | ||
* @category Array | ||
* @param {Array} array The array to search. | ||
* @param {Array} array The array to inspect. | ||
* @param {*} value The value to search for. | ||
@@ -148,29 +146,4 @@ * @param {number} [fromIndex=0] The index to search from. | ||
/** | ||
* Checks if `value` is classified as a `Function` object. | ||
* | ||
* @static | ||
* @memberOf _ | ||
* @since 0.1.0 | ||
* @category Lang | ||
* @param {*} value The value to check. | ||
* @returns {boolean} Returns `true` if `value` is a function, else `false`. | ||
* @example | ||
* | ||
* _.isFunction(_); | ||
* // => true | ||
* | ||
* _.isFunction(/abc/); | ||
* // => false | ||
*/ | ||
function isFunction(value) { | ||
// The use of `Object#toString` avoids issues with the `typeof` operator | ||
// in Safari 8 which returns 'object' for typed array and weak map constructors, | ||
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances. | ||
var tag = isObject(value) ? objectToString.call(value) : ''; | ||
return tag == funcTag || tag == genTag; | ||
} | ||
/** | ||
* Checks if `value` is the | ||
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) | ||
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) | ||
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) | ||
@@ -292,3 +265,3 @@ * | ||
* **Note:** This method is loosely based on | ||
* [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). | ||
* [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). | ||
* | ||
@@ -353,3 +326,3 @@ * @static | ||
if (isObject(value)) { | ||
var other = isFunction(value.valueOf) ? value.valueOf() : value; | ||
var other = typeof value.valueOf == 'function' ? value.valueOf() : value; | ||
value = isObject(other) ? (other + '') : other; | ||
@@ -356,0 +329,0 @@ } |
{ | ||
"name": "lodash.indexof", | ||
"version": "4.0.4", | ||
"version": "4.0.5", | ||
"description": "The lodash method `_.indexOf` exported as a module.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://lodash.com/", |
@@ -1,2 +0,2 @@ | ||
# lodash.indexof v4.0.4 | ||
# lodash.indexof v4.0.5 | ||
@@ -18,2 +18,2 @@ The [lodash](https://lodash.com/) method `_.indexOf` exported as a [Node.js](https://nodejs.org/) module. | ||
See the [documentation](https://lodash.com/docs#indexOf) or [package source](https://github.com/lodash/lodash/blob/4.0.4-npm-packages/lodash.indexof) for more details. | ||
See the [documentation](https://lodash.com/docs#indexOf) or [package source](https://github.com/lodash/lodash/blob/4.0.5-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
11331
307