Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lodash.take

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.take - npm Package Compare versions

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

7

package.json
{
"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.
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