Socket
Socket
Sign inDemoInstall

lodash.tonumber

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash.tonumber - npm Package Compare versions

Comparing version 4.0.2 to 4.0.3

53

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

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

/** `Object#toString` result references. */
var funcTag = '[object Function]',
genTag = '[object GeneratorFunction]',
symbolTag = '[object Symbol]';
var symbolTag = '[object Symbol]';

@@ -38,3 +36,4 @@ /** Used to match leading and trailing whitespace. */

/**
* 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/7.0/#sec-object.prototype.tostring)
* of values.

@@ -45,3 +44,5 @@ */

/**
* Checks if `value` is classified as a `Function` object.
* Checks if `value` is the
* [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('')`)
*

@@ -53,29 +54,2 @@ * @static

* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified,
* 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](https://es5.github.io/#x8) of `Object`.
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.

@@ -137,4 +111,3 @@ * @example

* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is correctly classified,
* else `false`.
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
* @example

@@ -164,4 +137,4 @@ *

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

@@ -174,4 +147,4 @@ * _.toNumber(Number.MIN_VALUE);

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

@@ -186,3 +159,3 @@ function toNumber(value) {

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;

@@ -189,0 +162,0 @@ }

{
"name": "lodash.tonumber",
"version": "4.0.2",
"version": "4.0.3",
"description": "The lodash method `_.toNumber` exported as a module.",

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

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

# lodash.tonumber v4.0.2
# lodash.tonumber v4.0.3

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

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