Skip to content

Commit

Permalink
Merge 06e22ee into 1ae8870
Browse files Browse the repository at this point in the history
  • Loading branch information
fetzerch committed Oct 4, 2020
2 parents 1ae8870 + 06e22ee commit 41c2b16
Show file tree
Hide file tree
Showing 4 changed files with 1,585 additions and 1,370 deletions.
97 changes: 73 additions & 24 deletions dist/module.js
Expand Up @@ -128,7 +128,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Expand Down Expand Up @@ -397,7 +397,7 @@ exports.SunAndMoonDatasource = SunAndMoonDatasource;
var undefined;

/** Used as the semantic version number. */
var VERSION = '4.17.15';
var VERSION = '4.17.20';

/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
Expand Down Expand Up @@ -4104,8 +4104,21 @@ exports.SunAndMoonDatasource = SunAndMoonDatasource;
* @returns {Array} Returns the new sorted array.
*/
function baseOrderBy(collection, iteratees, orders) {
if (iteratees.length) {
iteratees = arrayMap(iteratees, function(iteratee) {
if (isArray(iteratee)) {
return function(value) {
return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
}
}
return iteratee;
});
} else {
iteratees = [identity];
}

var index = -1;
iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));
iteratees = arrayMap(iteratees, baseUnary(getIteratee()));

var result = baseMap(collection, function(value, key, collection) {
var criteria = arrayMap(iteratees, function(iteratee) {
Expand Down Expand Up @@ -4362,6 +4375,10 @@ exports.SunAndMoonDatasource = SunAndMoonDatasource;
var key = toKey(path[index]),
newValue = value;

if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
return object;
}

if (index != lastIndex) {
var objValue = nested[key];
newValue = customizer ? customizer(objValue, key, nested) : undefined;
Expand Down Expand Up @@ -4514,11 +4531,14 @@ exports.SunAndMoonDatasource = SunAndMoonDatasource;
* into `array`.
*/
function baseSortedIndexBy(array, value, iteratee, retHighest) {
value = iteratee(value);

var low = 0,
high = array == null ? 0 : array.length,
valIsNaN = value !== value,
high = array == null ? 0 : array.length;
if (high === 0) {
return 0;
}

value = iteratee(value);
var valIsNaN = value !== value,
valIsNull = value === null,
valIsSymbol = isSymbol(value),
valIsUndefined = value === undefined;
Expand Down Expand Up @@ -6003,10 +6023,11 @@ exports.SunAndMoonDatasource = SunAndMoonDatasource;
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
return false;
}
// Assume cyclic values are equal.
var stacked = stack.get(array);
if (stacked && stack.get(other)) {
return stacked == other;
// Check that cyclic values are equal.
var arrStacked = stack.get(array);
var othStacked = stack.get(other);
if (arrStacked && othStacked) {
return arrStacked == other && othStacked == array;
}
var index = -1,
result = true,
Expand Down Expand Up @@ -6168,10 +6189,11 @@ exports.SunAndMoonDatasource = SunAndMoonDatasource;
return false;
}
}
// Assume cyclic values are equal.
var stacked = stack.get(object);
if (stacked && stack.get(other)) {
return stacked == other;
// Check that cyclic values are equal.
var objStacked = stack.get(object);
var othStacked = stack.get(other);
if (objStacked && othStacked) {
return objStacked == other && othStacked == object;
}
var result = true;
stack.set(object, other);
Expand Down Expand Up @@ -9552,6 +9574,10 @@ exports.SunAndMoonDatasource = SunAndMoonDatasource;
* // The `_.property` iteratee shorthand.
* _.filter(users, 'active');
* // => objects for ['barney']
*
* // Combining several predicates using `_.overEvery` or `_.overSome`.
* _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
* // => objects for ['fred', 'barney']
*/
function filter(collection, predicate) {
var func = isArray(collection) ? arrayFilter : baseFilter;
Expand Down Expand Up @@ -10301,15 +10327,15 @@ exports.SunAndMoonDatasource = SunAndMoonDatasource;
* var users = [
* { 'user': 'fred', 'age': 48 },
* { 'user': 'barney', 'age': 36 },
* { 'user': 'fred', 'age': 40 },
* { 'user': 'fred', 'age': 30 },
* { 'user': 'barney', 'age': 34 }
* ];
*
* _.sortBy(users, [function(o) { return o.user; }]);
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
*
* _.sortBy(users, ['user', 'age']);
* // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
* // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
*/
var sortBy = baseRest(function(collection, iteratees) {
if (collection == null) {
Expand Down Expand Up @@ -15184,11 +15210,11 @@ exports.SunAndMoonDatasource = SunAndMoonDatasource;

// Use a sourceURL for easier debugging.
// The sourceURL gets injected into the source that's eval-ed, so be careful
// with lookup (in case of e.g. prototype pollution), and strip newlines if any.
// A newline wouldn't be a valid sourceURL anyway, and it'd enable code injection.
// to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in
// and escape the comment, thus injecting code that gets evaled.
var sourceURL = '//# sourceURL=' +
(hasOwnProperty.call(options, 'sourceURL')
? (options.sourceURL + '').replace(/[\r\n]/g, ' ')
? (options.sourceURL + '').replace(/\s/g, ' ')
: ('lodash.templateSources[' + (++templateCounter) + ']')
) + '\n';

Expand Down Expand Up @@ -15221,8 +15247,6 @@ exports.SunAndMoonDatasource = SunAndMoonDatasource;

// If `variable` is not specified wrap a with-statement around the generated
// code to add the data object to the top of the scope chain.
// Like with sourceURL, we take care to not check the option's prototype,
// as this configuration is a code injection vector.
var variable = hasOwnProperty.call(options, 'variable') && options.variable;
if (!variable) {
source = 'with (obj) {\n' + source + '\n}\n';
Expand Down Expand Up @@ -15929,6 +15953,9 @@ exports.SunAndMoonDatasource = SunAndMoonDatasource;
* values against any array or object value, respectively. See `_.isEqual`
* for a list of supported value comparisons.
*
* **Note:** Multiple values can be checked by combining several matchers
* using `_.overSome`
*
* @static
* @memberOf _
* @since 3.0.0
Expand All @@ -15944,6 +15971,10 @@ exports.SunAndMoonDatasource = SunAndMoonDatasource;
*
* _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
* // => [{ 'a': 4, 'b': 5, 'c': 6 }]
*
* // Checking for several possible values
* _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
* // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
*/
function matches(source) {
return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
Expand All @@ -15958,6 +15989,9 @@ exports.SunAndMoonDatasource = SunAndMoonDatasource;
* `srcValue` values against any array or object value, respectively. See
* `_.isEqual` for a list of supported value comparisons.
*
* **Note:** Multiple values can be checked by combining several matchers
* using `_.overSome`
*
* @static
* @memberOf _
* @since 3.2.0
Expand All @@ -15974,6 +16008,10 @@ exports.SunAndMoonDatasource = SunAndMoonDatasource;
*
* _.find(objects, _.matchesProperty('a', 4));
* // => { 'a': 4, 'b': 5, 'c': 6 }
*
* // Checking for several possible values
* _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));
* // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
*/
function matchesProperty(path, srcValue) {
return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
Expand Down Expand Up @@ -16197,6 +16235,10 @@ exports.SunAndMoonDatasource = SunAndMoonDatasource;
* Creates a function that checks if **all** of the `predicates` return
* truthy when invoked with the arguments it receives.
*
* Following shorthands are possible for providing predicates.
* Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
* Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
*
* @static
* @memberOf _
* @since 4.0.0
Expand All @@ -16223,6 +16265,10 @@ exports.SunAndMoonDatasource = SunAndMoonDatasource;
* Creates a function that checks if **any** of the `predicates` return
* truthy when invoked with the arguments it receives.
*
* Following shorthands are possible for providing predicates.
* Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
* Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
*
* @static
* @memberOf _
* @since 4.0.0
Expand All @@ -16242,6 +16288,9 @@ exports.SunAndMoonDatasource = SunAndMoonDatasource;
*
* func(NaN);
* // => false
*
* var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])
* var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])
*/
var overSome = createOver(arraySome);

Expand Down Expand Up @@ -17899,7 +17948,7 @@ var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
Expand Down
2 changes: 1 addition & 1 deletion dist/module.js.map

Large diffs are not rendered by default.

0 comments on commit 41c2b16

Please sign in to comment.