New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

lodash.random

Package Overview
Dependencies
Maintainers
3
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash.random - npm Package Compare versions

Comparing version 3.1.3 to 3.1.4

104

index.js
/**
* lodash 3.1.3 (Custom Build) <https://lodash.com/>
* lodash 3.1.4 (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
*/

@@ -16,3 +16,4 @@

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

@@ -95,4 +96,5 @@ /** Used to match leading and trailing whitespace. */

*
* **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
* that affects Safari on at least iOS 8.1-8.3 ARM64.
* **Note:** This function is used to avoid a
* [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects
* Safari on at least iOS 8.1-8.3 ARM64.
*

@@ -112,3 +114,4 @@ * @private

* @param {*} object The potential iteratee object argument.
* @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.
* @returns {boolean} Returns `true` if the arguments are from an iteratee call,
* else `false`.
*/

@@ -121,4 +124,5 @@ function isIterateeCall(value, index, object) {

if (type == 'number'
? (isArrayLike(object) && isIndex(index, object.length))
: (type == 'string' && index in object)) {
? (isArrayLike(object) && isIndex(index, object.length))
: (type == 'string' && index in object)
) {
return eq(object[index], value);

@@ -130,3 +134,4 @@ }

/**
* Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* Performs a
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* comparison between two values to determine if they are equivalent.

@@ -136,2 +141,3 @@ *

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

@@ -172,2 +178,3 @@ * @param {*} value The value to compare.

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

@@ -199,5 +206,7 @@ * @param {*} value The value to check.

* @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

@@ -222,9 +231,12 @@ *

*
* **Note:** This function is loosely based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
* **Note:** This function is loosely based on
* [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
* @returns {boolean} Returns `true` if `value` is a valid length,
* else `false`.
* @example

@@ -255,2 +267,3 @@ *

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

@@ -279,2 +292,53 @@ * @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 a number.

@@ -284,2 +348,3 @@ *

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

@@ -303,2 +368,8 @@ * @param {*} value The value to process.

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

@@ -321,4 +392,4 @@ var other = isFunction(value.valueOf) ? value.valueOf() : value;

* If only one argument is provided a number between `0` and the given number
* is returned. If `floating` is `true`, or either `lower` or `upper` are floats,
* a floating-point number is returned instead of an integer.
* is returned. If `floating` is `true`, or either `lower` or `upper` are
* floats, a floating-point number is returned instead of an integer.
*

@@ -330,2 +401,3 @@ * **Note:** JavaScript follows the IEEE-754 standard for resolving

* @memberOf _
* @since 0.7.0
* @category Number

@@ -332,0 +404,0 @@ * @param {number} [lower=0] The lower bound.

2

package.json
{
"name": "lodash.random",
"version": "3.1.3",
"version": "3.1.4",
"description": "The lodash method `_.random` exported as a module.",

@@ -5,0 +5,0 @@ "homepage": "https://lodash.com/",

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

# lodash.random v3.1.3
# lodash.random v3.1.4

@@ -18,2 +18,2 @@ The [lodash](https://lodash.com/) method `_.random` exported as a [Node.js](https://nodejs.org/) module.

See the [documentation](https://lodash.com/docs#random) or [package source](https://github.com/lodash/lodash/blob/3.1.3-npm-packages/lodash.random) for more details.
See the [documentation](https://lodash.com/docs#random) or [package source](https://github.com/lodash/lodash/blob/3.1.4-npm-packages/lodash.random) 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