Socket
Socket
Sign inDemoInstall

lodash

Package Overview
Dependencies
Maintainers
2
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash - npm Package Compare versions

Comparing version 4.17.1 to 4.17.2

5

_basePickBy.js
var baseGet = require('./_baseGet'),
baseSet = require('./_baseSet');
baseSet = require('./_baseSet'),
castPath = require('./_castPath');

@@ -23,3 +24,3 @@ /**

if (predicate(value, path)) {
baseSet(result, path, value);
baseSet(result, castPath(path, object), value);
}

@@ -26,0 +27,0 @@ }

17

_basePullAt.js

@@ -1,6 +0,3 @@

var castPath = require('./_castPath'),
isIndex = require('./_isIndex'),
last = require('./last'),
parent = require('./_parent'),
toKey = require('./_toKey');
var baseUnset = require('./_baseUnset'),
isIndex = require('./_isIndex');

@@ -32,11 +29,5 @@ /** Used for built-in method references. */

splice.call(array, index, 1);
} else {
baseUnset(array, index);
}
else {
var path = castPath(index, array),
object = parent(array, path);
if (object != null) {
delete object[toKey(last(path))];
}
}
}

@@ -43,0 +34,0 @@ }

@@ -6,8 +6,2 @@ var castPath = require('./_castPath'),

/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**

@@ -24,6 +18,5 @@ * The base implementation of `_.unset`.

object = parent(object, path);
var key = toKey(last(path));
return !(object != null && hasOwnProperty.call(object, key)) || delete object[key];
return object == null || delete object[toKey(last(path))];
}
module.exports = baseUnset;

@@ -27,4 +27,4 @@ /**

return b(n,t)},o.isFinite=function(n){return typeof n=="number"&&gn(n)},o.isFunction=V,o.isNaN=function(n){return L(n)&&n!=+n},o.isNull=function(n){return null===n},o.isNumber=L,o.isObject=H,o.isRegExp=function(n){return K(n)&&"[object RegExp]"==hn.call(n)},o.isString=Q,o.isUndefined=function(n){return n===nn},o.last=function(n){var t=null==n?0:n.length;return t?n[t-1]:nn},o.max=function(n){return n&&n.length?l(n,Y,y):nn},o.min=function(n){return n&&n.length?l(n,Y,j):nn},o.noConflict=function(){return on._===this&&(on._=vn),
this},o.noop=function(){},o.reduce=G,o.result=function(n,t,r){return t=null==n?nn:n[t],t===nn&&(t=r),V(t)?t.call(n):t},o.size=function(n){return null==n?0:(n=U(n)?n:_n(n),n.length)},o.some=function(n,t,r){return t=r?nn:t,w(n,_(t))},o.uniqueId=function(n){var t=++sn;return W(n)+t},o.each=C,o.first=P,Z(o,function(){var n={};return h(o,function(t,r){pn.call(o.prototype,r)||(n[r]=t)}),n}(),{chain:false}),o.VERSION="4.17.1",mn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){
this},o.noop=function(){},o.reduce=G,o.result=function(n,t,r){return t=null==n?nn:n[t],t===nn&&(t=r),V(t)?t.call(n):t},o.size=function(n){return null==n?0:(n=U(n)?n:_n(n),n.length)},o.some=function(n,t,r){return t=r?nn:t,w(n,_(t))},o.uniqueId=function(n){var t=++sn;return W(n)+t},o.each=C,o.first=P,Z(o,function(){var n={};return h(o,function(t,r){pn.call(o.prototype,r)||(n[r]=t)}),n}(),{chain:false}),o.VERSION="4.17.2",mn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){
var t=(/^(?:replace|split)$/.test(n)?String.prototype:an)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);o.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Nn(u)?u:[],n)}return this[r](function(r){return t.apply(Nn(r)?r:[],n)})}}),o.prototype.toJSON=o.prototype.valueOf=o.prototype.value=function(){return k(this.__wrapped__,this.__actions__)},typeof define=="function"&&typeof define.amd=="object"&&define.amd?(on._=o,
define(function(){return o})):cn?((cn.exports=o)._=o,un._=o):on._=o}).call(this);
var mapping = require('./_mapping'),
fallbackHolder = require('./placeholder');
/** Built-in value reference. */
var push = Array.prototype.push;
/**

@@ -65,2 +68,32 @@ * Creates a function, with an arity of `n`, that invokes `func` with the

/**
* This function is like `_.spread` except that it includes arguments after those spread.
*
* @private
* @param {Function} func The function to spread arguments over.
* @param {number} start The start position of the spread.
* @returns {Function} Returns the new function.
*/
function spread(func, start) {
return function() {
var length = arguments.length,
args = Array(length);
while (length--) {
args[length] = arguments[length];
}
var array = args[start],
lastIndex = args.length - 1,
otherArgs = args.slice(0, start);
if (array) {
push.apply(otherArgs, array);
}
if (start != lastIndex) {
push.apply(otherArgs, args.slice(start + 1));
}
return func.apply(this, otherArgs);
};
}
/**
* Creates a function that wraps `func` and uses `cloner` to clone the first

@@ -145,3 +178,2 @@ * argument it receives.

'rearg': util.rearg,
'spread': util.spread,
'toInteger': util.toInteger,

@@ -160,3 +192,2 @@ 'toPath': util.toPath

rearg = helpers.rearg,
spread = helpers.spread,
toInteger = helpers.toInteger,

@@ -163,0 +194,0 @@ toPath = helpers.toPath;

@@ -12,5 +12,4 @@ module.exports = {

'rearg': require('../rearg'),
'spread': require('../spread'),
'toInteger': require('../toInteger'),
'toPath': require('../toPath')
};

@@ -39,12 +39,12 @@ var arrayMap = require('./_arrayMap'),

}
var bitmask = CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG;
var isDeep = false;
paths = arrayMap(paths, function(path) {
path = castPath(path, object);
bitmask |= (path.length > 1 ? CLONE_DEEP_FLAG : 0);
isDeep || (isDeep = path.length > 1);
return path;
});
copyObject(object, getAllKeysIn(object), result);
result = baseClone(result, bitmask);
if (isDeep) {
result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG);
}
var length = paths.length;

@@ -51,0 +51,0 @@ while (length--) {

{
"name": "lodash",
"version": "4.17.1",
"version": "4.17.2",
"description": "Lodash modular utilities.",

@@ -5,0 +5,0 @@ "keywords": "modules, stdlib, util",

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

# lodash v4.17.1
# lodash v4.17.2

@@ -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.17.1-npm) for more details.
See the [package source](https://github.com/lodash/lodash/tree/4.17.2-npm) for more details.

@@ -34,0 +34,0 @@ **Note:**<br>

@@ -42,4 +42,4 @@ var castPath = require('./_castPath'),

if (!length) {
length = 1;
object = undefined;
length = 1;
}

@@ -46,0 +46,0 @@ while (++index < length) {

@@ -54,3 +54,2 @@ var apply = require('./_apply'),

var array = args[start],
lastIndex = args.length - 1,
otherArgs = castSlice(args, 0, start);

@@ -61,5 +60,2 @@

}
if (start != lastIndex) {
arrayPush(otherArgs, castSlice(args, start + 1));
}
return apply(func, this, otherArgs);

@@ -66,0 +62,0 @@ });

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

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

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

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