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

lodash

Package Overview
Dependencies
Maintainers
3
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.14.2 to 4.15.0

_asciiSize.js

2

_arrayIncludes.js

@@ -8,3 +8,3 @@ var baseIndexOf = require('./_baseIndexOf');

* @private
* @param {Array} [array] The array to search.
* @param {Array} [array] The array to inspect.
* @param {*} target The value to search for.

@@ -11,0 +11,0 @@ * @returns {boolean} Returns `true` if `target` is found, else `false`.

@@ -5,3 +5,3 @@ /**

* @private
* @param {Array} [array] The array to search.
* @param {Array} [array] The array to inspect.
* @param {*} target The value to search for.

@@ -8,0 +8,0 @@ * @param {Function} comparator The comparator invoked per element.

var baseTimes = require('./_baseTimes'),
isArguments = require('./isArguments'),
isArray = require('./isArray'),
isIndex = require('./_isIndex'),
isString = require('./isString');
isIndex = require('./_isIndex');

@@ -22,3 +21,5 @@ /** Used for built-in method references. */

function arrayLikeKeys(value, inherited) {
var result = (isArray(value) || isString(value) || isArguments(value))
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
// Safari 9 makes `arguments.length` enumerable in strict mode.
var result = (isArray(value) || isArguments(value))
? baseTimes(value.length, String)

@@ -25,0 +26,0 @@ : [];

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

* @private
* @param {Array} array The array to search.
* @param {Array} array The array to inspect.
* @param {*} key The key to search for.

@@ -10,0 +10,0 @@ * @returns {number} Returns the index of the matched value, else `-1`.

@@ -6,3 +6,3 @@ /**

* @private
* @param {Array} array The array to search.
* @param {Array} array The array to inspect.
* @param {Function} predicate The function invoked per iteration.

@@ -9,0 +9,0 @@ * @param {number} fromIndex The index to search from.

@@ -7,3 +7,3 @@ /**

* @private
* @param {Array|Object} collection The collection to search.
* @param {Array|Object} collection The collection to inspect.
* @param {Function} predicate The function invoked per iteration.

@@ -10,0 +10,0 @@ * @param {Function} eachFunc The function to iterate over `collection`.

@@ -8,3 +8,3 @@ var baseFindIndex = require('./_baseFindIndex'),

* @private
* @param {Array} array The array to search.
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.

@@ -11,0 +11,0 @@ * @param {number} fromIndex The index to search from.

@@ -5,3 +5,3 @@ /**

* @private
* @param {Array} array The array to search.
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.

@@ -8,0 +8,0 @@ * @param {number} fromIndex The index to search from.

@@ -17,6 +17,7 @@ var isFunction = require('./isFunction'),

/** Used for built-in method references. */
var objectProto = Object.prototype;
var funcProto = Function.prototype,
objectProto = Object.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString = Function.prototype.toString;
var funcToString = funcProto.toString;

@@ -23,0 +24,0 @@ /** Used to check objects for own properties. */

@@ -12,3 +12,3 @@ var assignValue = require('./_assignValue'),

* @private
* @param {Object} object The object to query.
* @param {Object} object The object to modify.
* @param {Array|string} path The path of the property to set.

@@ -15,0 +15,0 @@ * @param {*} value The value to set.

@@ -8,3 +8,3 @@ var baseGet = require('./_baseGet'),

* @private
* @param {Object} object The object to query.
* @param {Object} object The object to modify.
* @param {Array|string} path The path of the property to update.

@@ -11,0 +11,0 @@ * @param {Function} updater The function to produce the updated value.

var castSlice = require('./_castSlice'),
reHasComplexSymbol = require('./_reHasComplexSymbol'),
hasUnicode = require('./_hasUnicode'),
stringToArray = require('./_stringToArray'),

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

var strSymbols = reHasComplexSymbol.test(string)
var strSymbols = hasUnicode(string)
? stringToArray(string)

@@ -20,0 +20,0 @@ : undefined;

var baseRepeat = require('./_baseRepeat'),
baseToString = require('./_baseToString'),
castSlice = require('./_castSlice'),
reHasComplexSymbol = require('./_reHasComplexSymbol'),
hasUnicode = require('./_hasUnicode'),
stringSize = require('./_stringSize'),

@@ -28,3 +28,3 @@ stringToArray = require('./_stringToArray');

var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
return reHasComplexSymbol.test(chars)
return hasUnicode(chars)
? castSlice(stringToArray(result), 0, length).join('')

@@ -31,0 +31,0 @@ : result.slice(0, length);

var basePropertyOf = require('./_basePropertyOf');
/** Used to map latin-1 supplementary letters to basic latin letters. */
/** Used to map Latin Unicode letters to basic Latin letters. */
var deburredLetters = {
// Latin-1 Supplement block.
'\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',

@@ -11,4 +12,4 @@ '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',

'\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
'\xcC': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
'\xeC': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
'\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
'\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
'\xd1': 'N', '\xf1': 'n',

@@ -22,7 +23,44 @@ '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',

'\xde': 'Th', '\xfe': 'th',
'\xdf': 'ss'
'\xdf': 'ss',
// Latin Extended-A block.
'\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
'\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
'\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
'\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
'\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
'\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
'\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
'\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
'\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
'\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
'\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
'\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
'\u0134': 'J', '\u0135': 'j',
'\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
'\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
'\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
'\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
'\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
'\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
'\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
'\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
'\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
'\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
'\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
'\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
'\u0163': 't', '\u0165': 't', '\u0167': 't',
'\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
'\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
'\u0174': 'W', '\u0175': 'w',
'\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
'\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
'\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
'\u0132': 'IJ', '\u0133': 'ij',
'\u0152': 'Oe', '\u0153': 'oe',
'\u0149': "'n", '\u017f': 'ss'
};
/**
* Used by `_.deburr` to convert latin-1 supplementary letters to basic latin letters.
* Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
* letters to basic Latin letters.
*

@@ -29,0 +67,0 @@ * @private

@@ -45,3 +45,3 @@ var DataView = require('./_DataView'),

// Fallback for data views, maps, sets, and weak maps in IE 11,
// for data views in Edge, and promises in Node.js.
// for data views in Edge < 14, and promises in Node.js.
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||

@@ -48,0 +48,0 @@ (Map && getTag(new Map) != mapTag) ||

@@ -7,3 +7,2 @@ var castPath = require('./_castPath'),

isLength = require('./isLength'),
isString = require('./isString'),
toKey = require('./_toKey');

@@ -39,5 +38,5 @@

return !!length && isLength(length) && isIndex(key, length) &&
(isArray(object) || isString(object) || isArguments(object));
(isArray(object) || isArguments(object));
}
module.exports = hasPath;

@@ -1,29 +0,5 @@

var reHasComplexSymbol = require('./_reHasComplexSymbol');
var asciiSize = require('./_asciiSize'),
hasUnicode = require('./_hasUnicode'),
unicodeSize = require('./_unicodeSize');
/** Used to compose unicode character classes. */
var rsAstralRange = '\\ud800-\\udfff',
rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23',
rsComboSymbolsRange = '\\u20d0-\\u20f0',
rsVarRange = '\\ufe0e\\ufe0f';
/** Used to compose unicode capture groups. */
var rsAstral = '[' + rsAstralRange + ']',
rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',
rsFitz = '\\ud83c[\\udffb-\\udfff]',
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
rsNonAstral = '[^' + rsAstralRange + ']',
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
rsZWJ = '\\u200d';
/** Used to compose unicode regexes. */
var reOptMod = rsModifier + '?',
rsOptVar = '[' + rsVarRange + ']?',
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
rsSeq = rsOptVar + reOptMod + rsOptJoin,
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
var reComplexSymbol = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
/**

@@ -37,12 +13,7 @@ * Gets the number of symbols in `string`.

function stringSize(string) {
if (!(string && reHasComplexSymbol.test(string))) {
return string.length;
}
var result = reComplexSymbol.lastIndex = 0;
while (reComplexSymbol.test(string)) {
result++;
}
return result;
return hasUnicode(string)
? unicodeSize(string)
: asciiSize(string);
}
module.exports = stringSize;

@@ -1,27 +0,5 @@

/** Used to compose unicode character classes. */
var rsAstralRange = '\\ud800-\\udfff',
rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23',
rsComboSymbolsRange = '\\u20d0-\\u20f0',
rsVarRange = '\\ufe0e\\ufe0f';
var asciiToArray = require('./_asciiToArray'),
hasUnicode = require('./_hasUnicode'),
unicodeToArray = require('./_unicodeToArray');
/** Used to compose unicode capture groups. */
var rsAstral = '[' + rsAstralRange + ']',
rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',
rsFitz = '\\ud83c[\\udffb-\\udfff]',
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
rsNonAstral = '[^' + rsAstralRange + ']',
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
rsZWJ = '\\u200d';
/** Used to compose unicode regexes. */
var reOptMod = rsModifier + '?',
rsOptVar = '[' + rsVarRange + ']?',
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
rsSeq = rsOptVar + reOptMod + rsOptJoin,
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
var reComplexSymbol = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
/**

@@ -35,5 +13,7 @@ * Converts `string` to an array.

function stringToArray(string) {
return string.match(reComplexSymbol);
return hasUnicode(string)
? unicodeToArray(string)
: asciiToArray(string);
}
module.exports = stringToArray;

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

/** Used for built-in method references. */
var funcProto = Function.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString = Function.prototype.toString;
var funcToString = funcProto.toString;

@@ -4,0 +7,0 @@ /**

@@ -27,3 +27,3 @@ /**

},u.isString=L,u.isUndefined=function(n){return n===Z},u.last=function(n){var t=n?n.length:0;return t?n[t-1]:Z},u.max=function(n){return n&&n.length?l(n,X,b):Z},u.min=function(n){return n&&n.length?l(n,X,j):Z},u.noConflict=function(){return un._===this&&(un._=hn),this},u.noop=function(){},u.reduce=C,u.result=function(n,t,r){return t=null==n?Z:n[t],t===Z&&(t=r),U(t)?t.call(n):t},u.size=function(n){return null==n?0:(n=P(n)?n:gn(n),n.length)},u.some=function(n,t,r){return t=r?Z:t,w(n,_(t))},u.uniqueId=function(n){
var t=++pn;return Q(n)+t},u.each=z,u.first=q,Y(u,function(){var n={};return h(u,function(t,r){ln.call(u.prototype,r)||(n[r]=t)}),n}(),{chain:false}),u.VERSION="4.14.2",jn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?String.prototype:fn)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);u.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(wn(u)?u:[],n);
var t=++pn;return Q(n)+t},u.each=z,u.first=q,Y(u,function(){var n={};return h(u,function(t,r){ln.call(u.prototype,r)||(n[r]=t)}),n}(),{chain:false}),u.VERSION="4.15.0",jn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?String.prototype:fn)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);u.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(wn(u)?u:[],n);
}return this[r](function(r){return t.apply(wn(r)?r:[],n)})}}),u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=function(){return k(this.__wrapped__,this.__actions__)},typeof define=="function"&&typeof define.amd=="object"&&define.amd?(un._=u, define(function(){return u})):on?((on.exports=u)._=u,en._=u):un._=u}).call(this);
var deburrLetter = require('./_deburrLetter'),
toString = require('./toString');
/** Used to match latin-1 supplementary letters (excluding mathematical operators). */
var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g;
/** Used to match Latin Unicode letters (excluding mathematical operators). */
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;

@@ -22,4 +22,5 @@ /** Used to compose unicode character classes. */

* Deburrs `string` by converting
* [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
* to basic latin letters and removing
* [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
* and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
* letters to basic Latin letters and removing
* [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).

@@ -40,5 +41,5 @@ *

string = toString(string);
return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, '');
return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
}
module.exports = deburr;

@@ -13,3 +13,3 @@ var baseClamp = require('./_baseClamp'),

* @category String
* @param {string} [string=''] The string to search.
* @param {string} [string=''] The string to inspect.
* @param {string} [target] The string to search for.

@@ -16,0 +16,0 @@ * @param {number} [position=string.length] The position to search up to.

@@ -13,3 +13,3 @@ var createFind = require('./_createFind'),

* @category Collection
* @param {Array|Object} collection The collection to search.
* @param {Array|Object} collection The collection to inspect.
* @param {Function} [predicate=_.identity]

@@ -16,0 +16,0 @@ * The function invoked per iteration.

@@ -16,3 +16,3 @@ var baseFindIndex = require('./_baseFindIndex'),

* @category Array
* @param {Array} array The array to search.
* @param {Array} array The array to inspect.
* @param {Function} [predicate=_.identity]

@@ -19,0 +19,0 @@ * The function invoked per iteration.

@@ -13,3 +13,3 @@ var baseFindKey = require('./_baseFindKey'),

* @category Object
* @param {Object} object The object to search.
* @param {Object} object The object to inspect.
* @param {Function} [predicate=_.identity] The function invoked per iteration.

@@ -16,0 +16,0 @@ * @returns {string|undefined} Returns the key of the matched element,

@@ -12,3 +12,3 @@ var createFind = require('./_createFind'),

* @category Collection
* @param {Array|Object} collection The collection to search.
* @param {Array|Object} collection The collection to inspect.
* @param {Function} [predicate=_.identity]

@@ -15,0 +15,0 @@ * The function invoked per iteration.

@@ -17,3 +17,3 @@ var baseFindIndex = require('./_baseFindIndex'),

* @category Array
* @param {Array} array The array to search.
* @param {Array} array The array to inspect.
* @param {Function} [predicate=_.identity]

@@ -20,0 +20,0 @@ * The function invoked per iteration.

@@ -13,3 +13,3 @@ var baseFindKey = require('./_baseFindKey'),

* @category Object
* @param {Object} object The object to search.
* @param {Object} object The object to inspect.
* @param {Function} [predicate=_.identity] The function invoked per iteration.

@@ -16,0 +16,0 @@ * @returns {string|undefined} Returns the key of the matched element,

@@ -21,3 +21,3 @@ var baseIndexOf = require('./_baseIndexOf'),

* @category Collection
* @param {Array|Object|string} collection The collection to search.
* @param {Array|Object|string} collection The collection to inspect.
* @param {*} value The value to search for.

@@ -24,0 +24,0 @@ * @param {number} [fromIndex=0] The index to search from.

@@ -17,3 +17,3 @@ var baseIndexOf = require('./_baseIndexOf'),

* @category Array
* @param {Array} array The array to search.
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.

@@ -20,0 +20,0 @@ * @param {number} [fromIndex=0] The index to search from.

@@ -41,3 +41,3 @@ var isArrayLikeObject = require('./isArrayLikeObject');

function isArguments(value) {
// Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&

@@ -44,0 +44,0 @@ (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);

@@ -6,6 +6,3 @@ var getTag = require('./_getTag'),

isBuffer = require('./isBuffer'),
isFunction = require('./isFunction'),
isObjectLike = require('./isObjectLike'),
isPrototype = require('./_isPrototype'),
isString = require('./isString'),
nativeKeys = require('./_nativeKeys');

@@ -64,22 +61,21 @@

if (isArrayLike(value) &&
(isArray(value) || isString(value) || isFunction(value.splice) ||
isArguments(value) || isBuffer(value))) {
(isArray(value) || typeof value == 'string' ||
typeof value.splice == 'function' || isBuffer(value) || isArguments(value))) {
return !value.length;
}
if (isObjectLike(value)) {
var tag = getTag(value);
if (tag == mapTag || tag == setTag) {
return !value.size;
}
var tag = getTag(value);
if (tag == mapTag || tag == setTag) {
return !value.size;
}
var isProto = isPrototype(value);
if (nonEnumShadows || isPrototype(value)) {
return !nativeKeys(value).length;
}
for (var key in value) {
if (hasOwnProperty.call(value, key) &&
!(isProto && key == 'constructor')) {
if (hasOwnProperty.call(value, key)) {
return false;
}
}
return !(nonEnumShadows && nativeKeys(value).length);
return true;
}
module.exports = isEmpty;

@@ -36,4 +36,3 @@ var isObject = require('./isObject');

// The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 8 which returns 'object' for typed array and weak map constructors,
// and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
// in Safari 8-9 which returns 'object' for typed array and other constructors.
var tag = isObject(value) ? objectToString.call(value) : '';

@@ -40,0 +39,0 @@ return tag == funcTag || tag == genTag;

@@ -9,6 +9,7 @@ var getPrototype = require('./_getPrototype'),

/** Used for built-in method references. */
var objectProto = Object.prototype;
var funcProto = Function.prototype,
objectProto = Object.prototype;
/** Used to resolve the decompiled source of functions. */
var funcToString = Function.prototype.toString;
var funcToString = funcProto.toString;

@@ -15,0 +16,0 @@ /** Used to check objects for own properties. */

@@ -17,3 +17,3 @@ var baseFindIndex = require('./_baseFindIndex'),

* @category Array
* @param {Array} array The array to search.
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.

@@ -20,0 +20,0 @@ * @param {number} [fromIndex=array.length-1] The index to search from.

{
"name": "lodash",
"version": "4.14.2",
"version": "4.15.0",
"description": "Lodash modular utilities.",

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

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

# lodash v4.14.2
# lodash v4.15.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.14.2-npm) for more details.
See the [package source](https://github.com/lodash/lodash/tree/4.15.0-npm) for more details.

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

var toString = require('./toString');
/** Used for built-in method references. */
var stringProto = String.prototype;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeReplace = stringProto.replace;
/**

@@ -32,5 +26,5 @@ * Replaces matches for `pattern` in `string` with `replacement`.

return args.length < 3 ? string : nativeReplace.call(string, args[1], args[2]);
return args.length < 3 ? string : string.replace(args[1], args[2]);
}
module.exports = replace;
var baseKeys = require('./_baseKeys'),
getTag = require('./_getTag'),
isArrayLike = require('./isArrayLike'),
isObjectLike = require('./isObjectLike'),
isString = require('./isString'),

@@ -20,3 +19,3 @@ stringSize = require('./_stringSize');

* @category Collection
* @param {Array|Object} collection The collection to inspect.
* @param {Array|Object|string} collection The collection to inspect.
* @returns {number} Returns the collection size.

@@ -39,10 +38,7 @@ * @example

if (isArrayLike(collection)) {
var result = collection.length;
return (result && isString(collection)) ? stringSize(collection) : result;
return isString(collection) ? stringSize(collection) : collection.length;
}
if (isObjectLike(collection)) {
var tag = getTag(collection);
if (tag == mapTag || tag == setTag) {
return collection.size;
}
var tag = getTag(collection);
if (tag == mapTag || tag == setTag) {
return collection.size;
}

@@ -49,0 +45,0 @@ return baseKeys(collection).length;

@@ -12,3 +12,3 @@ var baseSortedIndex = require('./_baseSortedIndex'),

* @category Array
* @param {Array} array The array to search.
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.

@@ -15,0 +15,0 @@ * @returns {number} Returns the index of the matched value, else `-1`.

@@ -12,3 +12,3 @@ var baseSortedIndex = require('./_baseSortedIndex'),

* @category Array
* @param {Array} array The array to search.
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.

@@ -15,0 +15,0 @@ * @returns {number} Returns the index of the matched value, else `-1`.

var baseToString = require('./_baseToString'),
castSlice = require('./_castSlice'),
hasUnicode = require('./_hasUnicode'),
isIterateeCall = require('./_isIterateeCall'),
isRegExp = require('./isRegExp'),
reHasComplexSymbol = require('./_reHasComplexSymbol'),
stringToArray = require('./_stringToArray'),

@@ -12,8 +12,2 @@ toString = require('./toString');

/** Used for built-in method references. */
var stringProto = String.prototype;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeSplit = stringProto.split;
/**

@@ -52,9 +46,9 @@ * Splits `string` by `separator`.

separator = baseToString(separator);
if (separator == '' && reHasComplexSymbol.test(string)) {
if (!separator && hasUnicode(string)) {
return castSlice(stringToArray(string), 0, limit);
}
}
return nativeSplit.call(string, separator, limit);
return string.split(separator, limit);
}
module.exports = split;

@@ -13,3 +13,3 @@ var baseClamp = require('./_baseClamp'),

* @category String
* @param {string} [string=''] The string to search.
* @param {string} [string=''] The string to inspect.
* @param {string} [target] The string to search for.

@@ -16,0 +16,0 @@ * @param {number} [position=0] The position to search from.

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

var isFunction = require('./isFunction'),
isObject = require('./isObject'),
var isObject = require('./isObject'),
isSymbol = require('./isSymbol');

@@ -54,3 +53,3 @@

if (isObject(value)) {
var other = isFunction(value.valueOf) ? value.valueOf() : value;
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
value = isObject(other) ? (other + '') : other;

@@ -57,0 +56,0 @@ }

var baseToString = require('./_baseToString'),
castSlice = require('./_castSlice'),
hasUnicode = require('./_hasUnicode'),
isObject = require('./isObject'),
isRegExp = require('./isRegExp'),
reHasComplexSymbol = require('./_reHasComplexSymbol'),
stringSize = require('./_stringSize'),

@@ -67,3 +67,3 @@ stringToArray = require('./_stringToArray'),

var strLength = string.length;
if (reHasComplexSymbol.test(string)) {
if (hasUnicode(string)) {
var strSymbols = stringToArray(string);

@@ -70,0 +70,0 @@ strLength = strSymbols.length;

@@ -1,60 +0,6 @@

var toString = require('./toString');
var asciiWords = require('./_asciiWords'),
hasUnicodeWord = require('./_hasUnicodeWord'),
toString = require('./toString'),
unicodeWords = require('./_unicodeWords');
/** Used to match non-compound words composed of alphanumeric characters. */
var reBasicWord = /[a-zA-Z0-9]+/g;
/** Used to compose unicode character classes. */
var rsAstralRange = '\\ud800-\\udfff',
rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23',
rsComboSymbolsRange = '\\u20d0-\\u20f0',
rsDingbatRange = '\\u2700-\\u27bf',
rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
rsPunctuationRange = '\\u2000-\\u206f',
rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
rsVarRange = '\\ufe0e\\ufe0f',
rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
/** Used to compose unicode capture groups. */
var rsApos = "['\u2019]",
rsBreak = '[' + rsBreakRange + ']',
rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',
rsDigits = '\\d+',
rsDingbat = '[' + rsDingbatRange + ']',
rsLower = '[' + rsLowerRange + ']',
rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
rsFitz = '\\ud83c[\\udffb-\\udfff]',
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
rsNonAstral = '[^' + rsAstralRange + ']',
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
rsUpper = '[' + rsUpperRange + ']',
rsZWJ = '\\u200d';
/** Used to compose unicode regexes. */
var rsLowerMisc = '(?:' + rsLower + '|' + rsMisc + ')',
rsUpperMisc = '(?:' + rsUpper + '|' + rsMisc + ')',
rsOptLowerContr = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
rsOptUpperContr = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
reOptMod = rsModifier + '?',
rsOptVar = '[' + rsVarRange + ']?',
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
rsSeq = rsOptVar + reOptMod + rsOptJoin,
rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;
/** Used to match complex or compound words. */
var reComplexWord = RegExp([
rsUpper + '?' + rsLower + '+' + rsOptLowerContr + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
rsUpperMisc + '+' + rsOptUpperContr + '(?=' + [rsBreak, rsUpper + rsLowerMisc, '$'].join('|') + ')',
rsUpper + '?' + rsLowerMisc + '+' + rsOptLowerContr,
rsUpper + '+' + rsOptUpperContr,
rsDigits,
rsEmoji
].join('|'), 'g');
/** Used to detect strings that need a more robust regexp to match words. */
var reHasComplexWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
/**

@@ -84,3 +30,3 @@ * Splits `string` into an array of its words.

if (pattern === undefined) {
pattern = reHasComplexWord.test(string) ? reComplexWord : reBasicWord;
return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
}

@@ -87,0 +33,0 @@ return string.match(pattern) || [];

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