lodash.take
Advanced tools
Comparing version 4.0.4 to 4.1.0
39
index.js
@@ -9,3 +9,2 @@ /** | ||
*/ | ||
var baseSlice = require('lodash._baseslice'); | ||
@@ -48,2 +47,32 @@ /** Used as references for various `Number` constants. */ | ||
/** | ||
* The base implementation of `_.slice` without an iteratee call guard. | ||
* | ||
* @private | ||
* @param {Array} array The array to slice. | ||
* @param {number} [start=0] The start position. | ||
* @param {number} [end=array.length] The end position. | ||
* @returns {Array} Returns the slice of `array`. | ||
*/ | ||
function baseSlice(array, start, end) { | ||
var index = -1, | ||
length = array.length; | ||
if (start < 0) { | ||
start = -start > length ? 0 : (length + start); | ||
} | ||
end = end > length ? length : end; | ||
if (end < 0) { | ||
end += length; | ||
} | ||
length = start > end ? 0 : ((end - start) >>> 0); | ||
start >>>= 0; | ||
var result = Array(length); | ||
while (++index < length) { | ||
result[index] = array[index + start]; | ||
} | ||
return result; | ||
} | ||
/** | ||
* Creates a slice of `array` with `n` elements taken from the beginning. | ||
@@ -89,4 +118,3 @@ * | ||
* @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 function, else `false`. | ||
* @example | ||
@@ -174,4 +202,3 @@ * | ||
* @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 | ||
@@ -228,3 +255,3 @@ * | ||
* | ||
* **Note:** This function is loosely based on | ||
* **Note:** This method is loosely based on | ||
* [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). | ||
@@ -231,0 +258,0 @@ * |
{ | ||
"name": "lodash.take", | ||
"version": "4.0.4", | ||
"version": "4.1.0", | ||
"description": "The lodash method `_.take` exported as a module.", | ||
@@ -16,6 +16,3 @@ "homepage": "https://lodash.com/", | ||
"repository": "lodash/lodash", | ||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, | ||
"dependencies": { | ||
"lodash._baseslice": "~4.0.0" | ||
} | ||
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } | ||
} |
@@ -1,2 +0,2 @@ | ||
# lodash.take v4.0.4 | ||
# lodash.take v4.1.0 | ||
@@ -18,2 +18,2 @@ The [lodash](https://lodash.com/) method `_.take` exported as a [Node.js](https://nodejs.org/) module. | ||
See the [documentation](https://lodash.com/docs#take) or [package source](https://github.com/lodash/lodash/blob/4.0.4-npm-packages/lodash.take) for more details. | ||
See the [documentation](https://lodash.com/docs#take) or [package source](https://github.com/lodash/lodash/blob/4.1.0-npm-packages/lodash.take) for more details. |
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
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
10808
0
303
- Removedlodash._baseslice@~4.0.0
- Removedlodash._baseslice@4.0.0(transitive)