lodash.tail
Advanced tools
Comparing version 4.0.2 to 4.0.3
82
index.js
/** | ||
* lodash 4.0.2 (Custom Build) <https://lodash.com/> | ||
* lodash 4.0.3 (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 | ||
*/ | ||
@@ -18,3 +18,4 @@ var baseSlice = require('lodash._baseslice'); | ||
var funcTag = '[object Function]', | ||
genTag = '[object GeneratorFunction]'; | ||
genTag = '[object GeneratorFunction]', | ||
symbolTag = '[object Symbol]'; | ||
@@ -50,6 +51,7 @@ /** Used to match leading and trailing whitespace. */ | ||
* @memberOf _ | ||
* @since 0.5.0 | ||
* @category Array | ||
* @param {Array} array The array to query. | ||
* @param {number} [n=1] The number of elements to drop. | ||
* @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`. | ||
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. | ||
* @returns {Array} Returns the slice of `array`. | ||
@@ -84,2 +86,3 @@ * @example | ||
* @memberOf _ | ||
* @since 4.0.0 | ||
* @category Array | ||
@@ -102,5 +105,7 @@ * @param {Array} array The array to query. | ||
* @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 | ||
@@ -128,2 +133,3 @@ * | ||
* @memberOf _ | ||
* @since 0.1.0 | ||
* @category Lang | ||
@@ -152,8 +158,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 | ||
@@ -194,2 +253,3 @@ * @param {*} value The value to convert. | ||
* @memberOf _ | ||
* @since 4.0.0 | ||
* @category Lang | ||
@@ -213,2 +273,8 @@ * @param {*} value The value to process. | ||
function toNumber(value) { | ||
if (typeof value == 'number') { | ||
return value; | ||
} | ||
if (isSymbol(value)) { | ||
return NAN; | ||
} | ||
if (isObject(value)) { | ||
@@ -215,0 +281,0 @@ var other = isFunction(value.valueOf) ? value.valueOf() : value; |
{ | ||
"name": "lodash.tail", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"description": "The lodash method `_.tail` exported as a module.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://lodash.com/", |
@@ -1,2 +0,2 @@ | ||
# lodash.tail v4.0.2 | ||
# lodash.tail v4.0.3 | ||
@@ -18,2 +18,2 @@ The [lodash](https://lodash.com/) method `_.tail` exported as a [Node.js](https://nodejs.org/) module. | ||
See the [documentation](https://lodash.com/docs#tail) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.tail) for more details. | ||
See the [documentation](https://lodash.com/docs#tail) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.tail) for more details. |
Sorry, the diff of this file is not supported yet
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
Mixed license
License(Experimental) Package contains multiple licenses.
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
9990
268
1