Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lodash.indexof

Package Overview
Dependencies
Maintainers
3
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash.indexof - npm Package Compare versions

Comparing version 4.0.1 to 4.0.2

83

index.js
/**
* lodash 4.0.1 (Custom Build) <https://lodash.com/>
* lodash 4.0.2 (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./`
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license <https://lodash.com/license>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/

@@ -17,3 +17,4 @@

var funcTag = '[object Function]',
genTag = '[object GeneratorFunction]';
genTag = '[object GeneratorFunction]',
symbolTag = '[object Symbol]';

@@ -101,2 +102,3 @@ /** Used to match leading and trailing whitespace. */

* @memberOf _
* @since 0.1.0
* @category Array

@@ -133,5 +135,7 @@ * @param {Array} array The array to search.

* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
* @returns {boolean} Returns `true` if `value` is correctly classified,
* else `false`.
* @example

@@ -147,4 +151,4 @@ *

// The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 8 which returns 'object' for typed array constructors, and
// PhantomJS 1.9 which returns 'function' for `NodeList` instances.
// 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) : '';

@@ -160,2 +164,3 @@ return tag == funcTag || tag == genTag;

* @memberOf _
* @since 0.1.0
* @category Lang

@@ -184,8 +189,61 @@ * @param {*} value The value to check.

/**
* Checks if `value` is object-like. A value is object-like if it's not `null`
* and has a `typeof` result of "object".
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
* @example
*
* _.isObjectLike({});
* // => true
*
* _.isObjectLike([1, 2, 3]);
* // => true
*
* _.isObjectLike(_.noop);
* // => false
*
* _.isObjectLike(null);
* // => false
*/
function isObjectLike(value) {
return !!value && typeof value == 'object';
}
/**
* Checks if `value` is classified as a `Symbol` primitive or object.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified,
* else `false`.
* @example
*
* _.isSymbol(Symbol.iterator);
* // => true
*
* _.isSymbol('abc');
* // => false
*/
function isSymbol(value) {
return typeof value == 'symbol' ||
(isObjectLike(value) && objectToString.call(value) == symbolTag);
}
/**
* Converts `value` to an integer.
*
* **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
* **Note:** This function is loosely based on
* [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang

@@ -226,2 +284,3 @@ * @param {*} value The value to convert.

* @memberOf _
* @since 4.0.0
* @category Lang

@@ -245,2 +304,8 @@ * @param {*} value The value to process.

function toNumber(value) {
if (typeof value == 'number') {
return value;
}
if (isSymbol(value)) {
return NAN;
}
if (isObject(value)) {

@@ -247,0 +312,0 @@ var other = isFunction(value.valueOf) ? value.valueOf() : value;

4

package.json
{
"name": "lodash.indexof",
"version": "4.0.1",
"version": "4.0.2",
"description": "The lodash method `_.indexOf` exported as a module.",

@@ -12,3 +12,3 @@ "homepage": "https://lodash.com/",

"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
"Blaine Bublitz <blaine@iceddev.com> (https://github.com/phated)",
"Blaine Bublitz <blaine.bublitz@gmail.com> (https://github.com/phated)",
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"

@@ -15,0 +15,0 @@ ],

@@ -1,2 +0,2 @@

# lodash.indexof v4.0.1
# lodash.indexof v4.0.2

@@ -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.1-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.2-npm-packages/lodash.indexof) for more details.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc