Socket
Socket
Sign inDemoInstall

lodash

Package Overview
Dependencies
0
Maintainers
3
Versions
114
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.2.1 to 4.3.0

_cloneArrayBuffer.js

5

_baseClone.js

@@ -6,2 +6,3 @@ var Stack = require('./_Stack'),

baseForOwn = require('./_baseForOwn'),
cloneBuffer = require('./_cloneBuffer'),
copyArray = require('./_copyArray'),

@@ -14,2 +15,3 @@ copySymbols = require('./_copySymbols'),

isArray = require('./isArray'),
isBuffer = require('./isBuffer'),
isHostObject = require('./_isHostObject'),

@@ -96,2 +98,5 @@ isObject = require('./isObject');

if (isBuffer(value)) {
return cloneBuffer(value, isDeep);
}
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {

@@ -98,0 +103,0 @@ if (isHostObject(value)) {

2

_baseDelay.js

@@ -11,3 +11,3 @@ /** Used as the `TypeError` message for "Functions" methods. */

* @param {number} wait The number of milliseconds to delay invocation.
* @param {Object} args The arguments provide to `func`.
* @param {Object} args The arguments to provide to `func`.
* @returns {number} Returns the timer id.

@@ -14,0 +14,0 @@ */

@@ -6,3 +6,3 @@ var arrayFilter = require('./_arrayFilter'),

* The base implementation of `_.functions` which creates an array of
* `object` function property names filtered from those provided.
* `object` function property names filtered from `props`.
*

@@ -9,0 +9,0 @@ * @private

@@ -1,16 +0,17 @@

var Uint8Array = require('./_Uint8Array');
/**
* Creates a clone of `buffer`.
* Creates a clone of `buffer`.
*
* @private
* @param {ArrayBuffer} buffer The array buffer to clone.
* @returns {ArrayBuffer} Returns the cloned array buffer.
* @param {Buffer} buffer The buffer to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Buffer} Returns the cloned buffer.
*/
function cloneBuffer(buffer) {
function cloneBuffer(buffer, isDeep) {
if (isDeep) {
return buffer.slice();
}
var Ctor = buffer.constructor,
result = new Ctor(buffer.byteLength),
view = new Uint8Array(result);
result = new Ctor(buffer.length);
view.set(new Uint8Array(buffer));
buffer.copy(result);
return result;

@@ -17,0 +18,0 @@ }

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

var cloneBuffer = require('./_cloneBuffer');
var cloneArrayBuffer = require('./_cloneArrayBuffer');

@@ -15,5 +15,5 @@ /**

return new Ctor(isDeep ? cloneBuffer(buffer) : buffer, typedArray.byteOffset, typedArray.length);
return new Ctor(isDeep ? cloneArrayBuffer(buffer) : buffer, typedArray.byteOffset, typedArray.length);
}
module.exports = cloneTypedArray;
var Map = require('./_Map'),
Set = require('./_Set');
Set = require('./_Set'),
WeakMap = require('./_WeakMap');

@@ -7,3 +8,4 @@ /** `Object#toString` result references. */

objectTag = '[object Object]',
setTag = '[object Set]';
setTag = '[object Set]',
weakMapTag = '[object WeakMap]';

@@ -22,5 +24,6 @@ /** Used for built-in method references. */

/** Used to detect maps and sets. */
/** Used to detect maps, sets, and weakmaps. */
var mapCtorString = Map ? funcToString.call(Map) : '',
setCtorString = Set ? funcToString.call(Set) : '';
setCtorString = Set ? funcToString.call(Set) : '',
weakMapCtorString = WeakMap ? funcToString.call(WeakMap) : '';

@@ -38,4 +41,6 @@ /**

// Fallback for IE 11 providing `toStringTag` values for maps and sets.
if ((Map && getTag(new Map) != mapTag) || (Set && getTag(new Set) != setTag)) {
// Fallback for IE 11 providing `toStringTag` values for maps, sets, and weakmaps.
if ((Map && getTag(new Map) != mapTag) ||
(Set && getTag(new Set) != setTag) ||
(WeakMap && getTag(new WeakMap) != weakMapTag)) {
getTag = function(value) {

@@ -47,8 +52,7 @@ var result = objectToString.call(value),

if (ctorString) {
if (ctorString == mapCtorString) {
return mapTag;
switch (ctorString) {
case mapCtorString: return mapTag;
case setCtorString: return setTag;
case weakMapCtorString: return weakMapTag;
}
if (ctorString == setCtorString) {
return setTag;
}
}

@@ -55,0 +59,0 @@ return result;

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

var cloneBuffer = require('./_cloneBuffer'),
var cloneArrayBuffer = require('./_cloneArrayBuffer'),
cloneMap = require('./_cloneMap'),

@@ -45,3 +45,3 @@ cloneRegExp = require('./_cloneRegExp'),

case arrayBufferTag:
return cloneBuffer(object);
return cloneArrayBuffer(object);

@@ -48,0 +48,0 @@ case boolTag:

@@ -7,3 +7,3 @@ var eq = require('./eq'),

/**
* Checks if the provided arguments are from an iteratee call.
* Checks if the given arguments are from an iteratee call.
*

@@ -10,0 +10,0 @@ * @private

@@ -17,2 +17,5 @@ /**

var result;
if (augend === undefined && addend === undefined) {
return 0;
}
if (augend !== undefined) {

@@ -19,0 +22,0 @@ result = augend;

@@ -55,2 +55,5 @@ var createWrapper = require('./_createWrapper'),

// Assign default placeholders.
bind.placeholder = {};
module.exports = bind;

@@ -65,2 +65,5 @@ var createWrapper = require('./_createWrapper'),

// Assign default placeholders.
bindKey.placeholder = {};
module.exports = bindKey;

@@ -6,3 +6,3 @@ var baseAssign = require('./_baseAssign'),

* Creates an object that inherits from the `prototype` object. If a `properties`
* object is provided its own enumerable properties are assigned to the created object.
* object is given its own enumerable properties are assigned to the created object.
*

@@ -9,0 +9,0 @@ * @static

@@ -53,2 +53,5 @@ var createWrapper = require('./_createWrapper');

// Assign default placeholders.
curry.placeholder = {};
module.exports = curry;

@@ -50,2 +50,5 @@ var createWrapper = require('./_createWrapper');

// Assign default placeholders.
curryRight.placeholder = {};
module.exports = curryRight;

@@ -138,3 +138,3 @@ var isObject = require('./isObject'),

} else {
if (!maxTimeoutId && !leading) {
if (!lastCalled && !maxTimeoutId && !leading) {
lastCalled = stamp;

@@ -141,0 +141,0 @@ }

@@ -8,3 +8,3 @@ var baseDifference = require('./_baseDifference'),

* Creates an array of unique `array` values not included in the other
* provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* given arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* for equality comparisons.

@@ -11,0 +11,0 @@ *

var createFlow = require('./_createFlow');
/**
* Creates a function that returns the result of invoking the provided
* functions with the `this` binding of the created function, where each
* successive invocation is supplied the return value of the previous.
* Creates a function that returns the result of invoking the given functions
* with the `this` binding of the created function, where each successive
* invocation is supplied the return value of the previous.
*

@@ -8,0 +8,0 @@ * @static

@@ -5,3 +5,3 @@ var createFlow = require('./_createFlow');

* This method is like `_.flow` except that it creates a function that
* invokes the provided functions from right to left.
* invokes the given functions from right to left.
*

@@ -8,0 +8,0 @@ * @static

@@ -12,5 +12,13 @@ var mapping = require('./_mapping'),

* @param {Function} func The function to wrap.
* @param {Object} [options] The options object.
* @param {boolean} [options.cap=true] Specify capping iteratee arguments.
* @param {boolean} [options.curry=true] Specify currying.
* @param {boolean} [options.fixed=true] Specify fixed arity.
* @param {boolean} [options.immutable=true] Specify immutable operations.
* @param {boolean} [options.rearg=true] Specify rearranging arguments.
* @returns {Function|Object} Returns the converted function or object.
*/
function baseConvert(util, name, func) {
function baseConvert(util, name, func, options) {
options || (options = {});
if (typeof func != 'function') {

@@ -23,2 +31,12 @@ func = name;

}
var config = {
'cap': 'cap' in options ? options.cap : true,
'curry': 'curry' in options ? options.curry : true,
'fixed': 'fixed' in options ? options.fixed : true,
'immutable': 'immutable' in options ? options.immutable : true,
'rearg': 'rearg' in options ? options.rearg : true
};
var forceRearg = ('rearg' in options) && options.rearg;
var isLib = name === undefined && typeof func.VERSION == 'string';

@@ -112,2 +130,5 @@

if (!config.cap) {
return iteratee(func, arity);
}
arity = arity > 2 ? (arity - 2) : 1;

@@ -151,3 +172,3 @@ func = iteratee(func);

return function(context) {
return baseConvert(util, runInContext(context));
return baseConvert(util, runInContext(context), undefined, options);
};

@@ -164,11 +185,13 @@ }

var wrapped = func;
if (mutateMap.array[name]) {
wrapped = immutWrap(func, cloneArray);
if (config.immutable) {
if (mutateMap.array[name]) {
wrapped = immutWrap(func, cloneArray);
}
else if (mutateMap.object[name]) {
wrapped = immutWrap(func, createCloner(func));
}
else if (mutateMap.set[name]) {
wrapped = immutWrap(func, cloneDeep);
}
}
else if (mutateMap.object[name]) {
wrapped = immutWrap(func, createCloner(func));
}
else if (mutateMap.set[name]) {
wrapped = immutWrap(func, cloneDeep);
}
var result;

@@ -182,15 +205,18 @@ each(mapping.caps, function(cap) {

result = spreadStart === undefined
? ary(wrapped, cap)
: spread(wrapped, spreadStart);
if (cap > 1 && !mapping.skipRearg[name]) {
if (config.fixed) {
result = spreadStart === undefined
? ary(wrapped, cap)
: spread(wrapped, spreadStart);
}
if (config.rearg && cap > 1 && (forceRearg || !mapping.skipRearg[name])) {
result = rearg(result, mapping.methodRearg[name] || mapping.aryRearg[cap]);
}
if (reargIndexes) {
result = iterateeRearg(result, reargIndexes);
} else if (aryN) {
result = iterateeAry(result, aryN);
if (config.cap) {
if (reargIndexes) {
result = iterateeRearg(result, reargIndexes);
} else if (aryN) {
result = iterateeAry(result, aryN);
}
}
if (cap > 1) {
if (config.curry && cap > 1) {
result = curry(result, cap);

@@ -197,0 +223,0 @@ }

@@ -7,8 +7,9 @@ var baseConvert = require('./_baseConvert');

* @param {Function} lodash The lodash function.
* @param {Object} [options] The options object. See `baseConvert` for more details.
* @returns {Function} Returns the converted `lodash`.
*/
function browserConvert(lodash) {
return baseConvert(lodash, lodash);
function browserConvert(lodash, options) {
return baseConvert(lodash, lodash, undefined, options);
}
module.exports = browserConvert;

@@ -229,2 +229,6 @@ /** Used to map aliases to their real names. */

'difference': true,
'gt': true,
'gte': true,
'lt': true,
'lte': true,
'matchesProperty': true,

@@ -231,0 +235,0 @@ 'merge': true,

@@ -10,8 +10,9 @@ var baseConvert = require('./_baseConvert'),

* @param {Function} [func] The function to wrap.
* @param {Object} [options] The options object. See `baseConvert` for more details.
* @returns {Function|Object} Returns the converted function or object.
*/
function convert(name, func) {
return baseConvert(util, name, func);
function convert(name, func, options) {
return baseConvert(util, name, func, options);
}
module.exports = convert;
/**
* This method returns the first argument provided to it.
* This method returns the first argument given to it.
*

@@ -4,0 +4,0 @@ * @static

@@ -7,4 +7,4 @@ var arrayMap = require('./_arrayMap'),

/**
* Creates an array of unique values that are included in all of the provided
* arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* Creates an array of unique values that are included in all given arrays
* using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* for equality comparisons.

@@ -11,0 +11,0 @@ *

@@ -11,5 +11,7 @@ module.exports = {

'isArray': require('./isArray'),
'isArrayBuffer': require('./isArrayBuffer'),
'isArrayLike': require('./isArrayLike'),
'isArrayLikeObject': require('./isArrayLikeObject'),
'isBoolean': require('./isBoolean'),
'isBuffer': require('./isBuffer'),
'isDate': require('./isDate'),

@@ -25,2 +27,3 @@ 'isElement': require('./isElement'),

'isLength': require('./isLength'),
'isMap': require('./isMap'),
'isMatch': require('./isMatch'),

@@ -38,2 +41,3 @@ 'isMatchWith': require('./isMatchWith'),

'isSafeInteger': require('./isSafeInteger'),
'isSet': require('./isSet'),
'isString': require('./isString'),

@@ -43,2 +47,4 @@ 'isSymbol': require('./isSymbol'),

'isUndefined': require('./isUndefined'),
'isWeakMap': require('./isWeakMap'),
'isWeakSet': require('./isWeakSet'),
'lt': require('./lt'),

@@ -45,0 +51,0 @@ 'lte': require('./lte'),

{
"name": "lodash",
"version": "4.2.1",
"version": "4.3.0",
"description": "Lodash modular utilities.",

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

@@ -47,2 +47,5 @@ var createWrapper = require('./_createWrapper'),

// Assign default placeholders.
partial.placeholder = {};
module.exports = partial;

@@ -46,2 +46,5 @@ var createWrapper = require('./_createWrapper'),

// Assign default placeholders.
partialRight.placeholder = {};
module.exports = partialRight;

@@ -5,3 +5,3 @@ var pullAll = require('./pullAll'),

/**
* Removes all provided values from `array` using
* Removes all given values from `array` using
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)

@@ -8,0 +8,0 @@ * for equality comparisons.

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

# lodash v4.2.1
# lodash v4.3.0

@@ -31,3 +31,3 @@ The [lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules.

See the [package source](https://github.com/lodash/lodash/tree/4.2.1-npm) for more details.
See the [package source](https://github.com/lodash/lodash/tree/4.3.0-npm) for more details.

@@ -38,21 +38,5 @@ **Note:**<br>

## Module formats
Lodash is available in a variety of other builds & module formats.
* [lodash](https://www.npmjs.com/package/lodash) & [per method packages](https://www.npmjs.com/browse/keyword/lodash-modularized)
* [lodash-amd](https://www.npmjs.com/package/lodash-amd)
* [lodash-es](https://www.npmjs.com/package/lodash-es) & [babel-plugin-lodash](https://www.npmjs.com/package/babel-plugin-lodash)
## Further Reading
* [API Documentation](https://lodash.com/docs)
* [Build Differences](https://github.com/lodash/lodash/wiki/Build-Differences)
* [Changelog](https://github.com/lodash/lodash/wiki/Changelog)
* [Roadmap](https://github.com/lodash/lodash/wiki/Roadmap)
* [More Resources](https://github.com/lodash/lodash/wiki/Resources)
## Support
Tested in Chrome 47-48, Firefox 43-44, IE 9-11, Edge 13, Safari 8-9, Node.js 0.10, 0.12, 4, & 5, & PhantomJS 1.9.8.
Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. Special thanks to [Sauce Labs](https://saucelabs.com/) for providing automated browser testing.
Tested in Chrome 47-48, Firefox 43-44, IE 9-11, Edge 13, Safari 8-9, Node.js 0.10, 0.12, 4, & 5, & PhantomJS 1.9.8.<br>
Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available.

@@ -11,3 +11,3 @@ var arrayReduce = require('./_arrayReduce'),

* invocation is supplied the return value of the previous. If `accumulator`
* is not provided the first element of `collection` is used as the initial
* is not given the first element of `collection` is used as the initial
* value. The iteratee is invoked with four arguments:

@@ -14,0 +14,0 @@ * (accumulator, value, index|key, collection).

@@ -17,2 +17,5 @@ /**

var result;
if (minuend === undefined && subtrahend === undefined) {
return 0;
}
if (minuend !== undefined) {

@@ -19,0 +22,0 @@ result = minuend;

@@ -32,3 +32,3 @@ var assignInDefaults = require('./_assignInDefaults'),

* properties may be accessed as free variables in the template. If a setting
* object is provided it takes precedence over `_.templateSettings` values.
* object is given it takes precedence over `_.templateSettings` values.
*

@@ -35,0 +35,0 @@ * **Note:** In the development build `_.template` utilizes

@@ -6,4 +6,4 @@ var baseFlatten = require('./_baseFlatten'),

/**
* Creates an array of unique values, in order, from all of the provided arrays
* using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* Creates an array of unique values, in order, from all given arrays using
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* for equality comparisons.

@@ -10,0 +10,0 @@ *

@@ -7,3 +7,3 @@ var toString = require('./toString');

/**
* Generates a unique ID. If `prefix` is provided the ID is appended to it.
* Generates a unique ID. If `prefix` is given the ID is appended to it.
*

@@ -10,0 +10,0 @@ * @static

@@ -6,3 +6,3 @@ var baseDifference = require('./_baseDifference'),

/**
* Creates an array excluding all provided values using
* Creates an array excluding all given values using
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)

@@ -9,0 +9,0 @@ * for equality comparisons.

@@ -8,3 +8,3 @@ var arrayFilter = require('./_arrayFilter'),

* Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
* of the provided arrays.
* of the given arrays.
*

@@ -11,0 +11,0 @@ * @static

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc