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

lodash.takeright

Package Overview
Dependencies
Maintainers
3
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash.takeright - npm Package Compare versions

Comparing version 4.0.3 to 4.0.4

71

index.js
/**
* lodash 4.0.3 (Custom Build) <https://lodash.com/>
* lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./`

@@ -40,3 +40,4 @@ * Copyright jQuery Foundation and other contributors <https://jquery.org/>

/**
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.

@@ -108,4 +109,5 @@ */

/**
* Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
* Checks if `value` is the
* [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*

@@ -189,2 +191,37 @@ * @static

/**
* Converts `value` to a finite number.
*
* @static
* @memberOf _
* @since 4.12.0
* @category Lang
* @param {*} value The value to convert.
* @returns {number} Returns the converted number.
* @example
*
* _.toFinite(3.2);
* // => 3.2
*
* _.toFinite(Number.MIN_VALUE);
* // => 5e-324
*
* _.toFinite(Infinity);
* // => 1.7976931348623157e+308
*
* _.toFinite('3.2');
* // => 3.2
*/
function toFinite(value) {
if (!value) {
return value === 0 ? value : 0;
}
value = toNumber(value);
if (value === INFINITY || value === -INFINITY) {
var sign = (value < 0 ? -1 : 1);
return sign * MAX_INTEGER;
}
return value === value ? value : 0;
}
/**
* Converts `value` to an integer.

@@ -203,3 +240,3 @@ *

*
* _.toInteger(3);
* _.toInteger(3.2);
* // => 3

@@ -213,16 +250,10 @@ *

*
* _.toInteger('3');
* _.toInteger('3.2');
* // => 3
*/
function toInteger(value) {
if (!value) {
return value === 0 ? value : 0;
}
value = toNumber(value);
if (value === INFINITY || value === -INFINITY) {
var sign = (value < 0 ? -1 : 1);
return sign * MAX_INTEGER;
}
var remainder = value % 1;
return value === value ? (remainder ? value - remainder : value) : 0;
var result = toFinite(value),
remainder = result % 1;
return result === result ? (remainder ? result - remainder : result) : 0;
}

@@ -241,4 +272,4 @@

*
* _.toNumber(3);
* // => 3
* _.toNumber(3.2);
* // => 3.2
*

@@ -251,4 +282,4 @@ * _.toNumber(Number.MIN_VALUE);

*
* _.toNumber('3');
* // => 3
* _.toNumber('3.2');
* // => 3.2
*/

@@ -255,0 +286,0 @@ function toNumber(value) {

{
"name": "lodash.takeright",
"version": "4.0.3",
"version": "4.0.4",
"description": "The lodash method `_.takeRight` exported as a module.",

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

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

# lodash.takeright v4.0.3
# lodash.takeright v4.0.4

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

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