import isObject from './isObject.js';
-import { nativeCreate } from './_setup.js';diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 5a8c72009..349ba98e4 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,2 +1,3 @@ tidelift: "npm/underscore" patreon: juliangonggrijp +github: [jgonggrijp] diff --git a/.github/config/codeql.yml b/.github/config/codeql.yml new file mode 100644 index 000000000..05e73fcf8 --- /dev/null +++ b/.github/config/codeql.yml @@ -0,0 +1,6 @@ +paths: + - 'modules/**' + - 'test/**' + - 'test-treeshake/**' + - 'rollup*.js' + - 'index.html' diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 000000000..3158b12ee --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,78 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ master ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ master ] + paths: + - 'modules/**' + - 'test/**' + - 'test-treeshake/**' + - 'rollup*.js' + - 'index.html' + schedule: + - cron: '16 8 * * 3' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'javascript' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Learn more about CodeQL language support at + # https://codeql.github.com/docs/codeql-overview/supported-languages-and-frameworks/ + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + config-file: ./.github/config/codeql.yml + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v3 + + # âšī¸ Command-line programs to run using the OS shell. + # đ https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions + + # âī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 diff --git a/.travis.yml b/.travis.yml index c7a49f431..87b67d7d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,4 @@ language: node_js -services: - - xvfb sudo: false jobs: include: @@ -8,24 +6,29 @@ jobs: env: - DOWNGRADE=true - EXTRA=false - - node_js: 10 + - node_js: 12 env: - DOWNGRADE=false - EXTRA=false - - node_js: 14 + - node_js: 16 env: - DOWNGRADE=false - EXTRA=true before_install: - - npm install -g karma-cli + - "[ $EXTRA = false ] || npm install -g karma-cli" before_script: - - npm install karma-sauce-launcher + - "[ $EXTRA = false ] || npm install karma-sauce-launcher" - "[ $DOWNGRADE = false ] || npm install rollup@1" script: - - npm test + - "[ $EXTRA = false ] || npm run lint" + - npm run prepare-tests + - "[ $EXTRA = false ] || npm run build-umd" + - "[ $EXTRA = false ] || npm run build-esm" + - "[ $EXTRA = false ] || npm run doc" + - "[ $EXTRA = true ] || npm run test-node" + - "[ $EXTRA = false ] || npm run coveralls" - "[ $EXTRA = false ] || npm run test-browser" - "[ $EXTRA = false ] || karma start karma.conf-sauce.js" - - "[ $EXTRA = false ] || npm run coveralls" notifications: email: false env: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4d29286a6..54e109680 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,9 +2,9 @@ * This project adheres to a [code of conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. -* Please do not open a ticket to report a security issue. Consult the [security policy](SECURITY.md) on what to do instead. +* Please do not open an issue to report a security issue. Consult the [security policy](SECURITY.md) on what to do instead. -* Before you open a ticket or send a pull request, [search](https://github.com/jashkenas/underscore/issues) for previous discussions about the same feature or issue. Add to the earlier ticket if you find one. +* Before you open an issue or send a pull request, [search](https://github.com/jashkenas/underscore/issues) for previous discussions about the same feature or issue. Add to the earlier ticket if you find one. * If you're proposing a new feature, make sure it isn't already implemented in [Underscore-Contrib](https://github.com/documentcloud/underscore-contrib). @@ -15,3 +15,6 @@ * Use the same coding style as the rest of the [codebase](https://github.com/jashkenas/underscore/blob/master/modules/index.js). * In your pull request, do not add documentation or re-build the minified `underscore-umd-min.js` file. We'll do those things before cutting a new release. + +### "Help, cloning fails with `fatal: fsck error in packed object`" +This error is caused by zero-padded file modes in the commit history. As fixing this is highly destructive, we suggest ignoring these warnings. The simplest way is to instruct git to do so when cloning. For example, to clone from `jashkenas/underscore`, run the following command: `git clone --config transfer.fsckobjects=false git@github.com:jashkenas/underscore.git`. If cloning from a different user or organization, replace `jashkenas` with their name in the previous command. \ No newline at end of file diff --git a/LICENSE b/LICENSE index 898908bf2..12a7f05a2 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors +Copyright (c) 2009-2022 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation diff --git a/docs/modules/_baseCreate.html b/docs/modules/_baseCreate.html index b507e58c2..29418ebe0 100644 --- a/docs/modules/_baseCreate.html +++ b/docs/modules/_baseCreate.html @@ -849,8 +849,8 @@
import isObject from './isObject.js';
-import { nativeCreate } from './_setup.js';import isObject from './isObject.js';
+import { nativeCreate } from './_setup.js';function ctor() {
- return function(){};
+ function ctor() {
+ return function(){};
}
@@ -882,13 +882,13 @@ _baseCreate.js
export default function baseCreate(prototype) {
- if (!isObject(prototype)) return {};
- if (nativeCreate) return nativeCreate(prototype);
- var Ctor = ctor();
- Ctor.prototype = prototype;
- var result = new Ctor;
- Ctor.prototype = null;
+ export default function baseCreate(prototype) {
+ if (!isObject(prototype)) return {};
+ if (nativeCreate) return nativeCreate(prototype);
+ var Ctor = ctor();
+ Ctor.prototype = prototype;
+ var result = new Ctor;
+ Ctor.prototype = null;
return result;
}
diff --git a/docs/modules/_baseIteratee.html b/docs/modules/_baseIteratee.html
index e231f8ee9..bb8441fab 100644
--- a/docs/modules/_baseIteratee.html
+++ b/docs/modules/_baseIteratee.html
@@ -849,13 +849,13 @@ _baseIteratee.js
import identity from './identity.js';
-import isFunction from './isFunction.js';
-import isObject from './isObject.js';
-import isArray from './isArray.js';
-import matcher from './matcher.js';
-import property from './property.js';
-import optimizeCb from './_optimizeCb.js';import identity from './identity.js';
+import isFunction from './isFunction.js';
+import isObject from './isObject.js';
+import isArray from './isArray.js';
+import matcher from './matcher.js';
+import property from './property.js';
+import optimizeCb from './_optimizeCb.js';export default function baseIteratee(value, context, argCount) {
+ export default function baseIteratee(value, context, argCount) {
if (value == null) return identity;
- if (isFunction(value)) return optimizeCb(value, context, argCount);
- if (isObject(value) && !isArray(value)) return matcher(value);
- return property(value);
+ if (isFunction(value)) return optimizeCb(value, context, argCount);
+ if (isObject(value) && !isArray(value)) return matcher(value);
+ return property(value);
}
diff --git a/docs/modules/_cb.html b/docs/modules/_cb.html
index e5aecd949..6f54ca463 100644
--- a/docs/modules/_cb.html
+++ b/docs/modules/_cb.html
@@ -849,9 +849,9 @@ _cb.js
import _ from './underscore.js';
-import baseIteratee from './_baseIteratee.js';
-import iteratee from './iteratee.js';import _ from './underscore.js';
+import baseIteratee from './_baseIteratee.js';
+import iteratee from './iteratee.js';export default function cb(value, context, argCount) {
- if (_.iteratee !== iteratee) return _.iteratee(value, context);
- return baseIteratee(value, context, argCount);
+ export default function cb(value, context, argCount) {
+ if (_.iteratee !== iteratee) return _.iteratee(value, context);
+ return baseIteratee(value, context, argCount);
}
diff --git a/docs/modules/_chainResult.html b/docs/modules/_chainResult.html
index 947ae9f5e..9845f6668 100644
--- a/docs/modules/_chainResult.html
+++ b/docs/modules/_chainResult.html
@@ -849,7 +849,7 @@ _chainResult.js
import _ from './underscore.js';import _ from './underscore.js';export default function chainResult(instance, obj) {
- return instance._chain ? _(obj).chain() : obj;
+ export default function chainResult(instance, obj) {
+ return instance._chain ? _(obj).chain() : obj;
}
diff --git a/docs/modules/_collectNonEnumProps.html b/docs/modules/_collectNonEnumProps.html
index d9f7f67a3..95107e150 100644
--- a/docs/modules/_collectNonEnumProps.html
+++ b/docs/modules/_collectNonEnumProps.html
@@ -849,9 +849,9 @@ _collectNonEnumProps.js
import { nonEnumerableProps, ObjProto } from './_setup.js';
-import isFunction from './isFunction.js';
-import has from './_has.js';import { nonEnumerableProps, ObjProto } from './_setup.js';
+import isFunction from './isFunction.js';
+import has from './_has.js';function emulatedSet(keys) {
+ function emulatedSet(keys) {
var hash = {};
- for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true;
+ for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true;
return {
- contains: function(key) { return hash[key] === true; },
- push: function(key) {
+ contains: function(key) { return hash[key] === true; },
+ push: function(key) {
hash[key] = true;
- return keys.push(key);
+ return keys.push(key);
}
};
}
@@ -896,11 +896,11 @@ _collectNonEnumProps.js
export default function collectNonEnumProps(obj, keys) {
- keys = emulatedSet(keys);
- var nonEnumIdx = nonEnumerableProps.length;
- var constructor = obj.constructor;
- var proto = isFunction(constructor) && constructor.prototype || ObjProto;export default function collectNonEnumProps(obj, keys) {
+ keys = emulatedSet(keys);
+ var nonEnumIdx = nonEnumerableProps.length;
+ var constructor = obj.constructor;
+ var proto = (isFunction(constructor) && constructor.prototype) || ObjProto; var prop = 'constructor';
- if (has(obj, prop) && !keys.contains(prop)) keys.push(prop);
+ var prop = 'constructor';
+ if (has(obj, prop) && !keys.contains(prop)) keys.push(prop);
while (nonEnumIdx--) {
prop = nonEnumerableProps[nonEnumIdx];
- if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) {
- keys.push(prop);
+ if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) {
+ keys.push(prop);
}
}
}
diff --git a/docs/modules/_createAssigner.html b/docs/modules/_createAssigner.html
index b223767b8..017d25b6f 100644
--- a/docs/modules/_createAssigner.html
+++ b/docs/modules/_createAssigner.html
@@ -850,15 +850,15 @@ _createAssigner.js
export default function createAssigner(keysFunc, defaults) {
- return function(obj) {
- var length = arguments.length;
- if (defaults) obj = Object(obj);
+ export default function createAssigner(keysFunc, defaults) {
+ return function(obj) {
+ var length = arguments.length;
+ if (defaults) obj = Object(obj);
if (length < 2 || obj == null) return obj;
for (var index = 1; index < length; index++) {
- var source = arguments[index],
- keys = keysFunc(source),
- l = keys.length;
+ var source = arguments[index],
+ keys = keysFunc(source),
+ l = keys.length;
for (var i = 0; i < l; i++) {
var key = keys[i];
if (!defaults || obj[key] === void 0) obj[key] = source[key];
diff --git a/docs/modules/_createEscaper.html b/docs/modules/_createEscaper.html
index ef39082d1..64457f139 100644
--- a/docs/modules/_createEscaper.html
+++ b/docs/modules/_createEscaper.html
@@ -849,7 +849,7 @@ _createEscaper.js
- import keys from './keys.js';
+ import keys from './keys.js';
@@ -865,8 +865,8 @@ _createEscaper.js
- export default function createEscaper(map) {
- var escaper = function(match) {
+ export default function createEscaper(map) {
+ var escaper = function(match) {
return map[match];
};
@@ -883,12 +883,12 @@ _createEscaper.js
- var source = '(?:' + keys(map).join('|') + ')';
- var testRegexp = RegExp(source);
- var replaceRegexp = RegExp(source, 'g');
- return function(string) {
- string = string == null ? '' : '' + string;
- return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
+ var source = '(?:' + keys(map).join('|') + ')';
+ var testRegexp = RegExp(source);
+ var replaceRegexp = RegExp(source, 'g');
+ return function(string) {
+ string = string == null ? '' : '' + string;
+ return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
};
}
diff --git a/docs/modules/_createIndexFinder.html b/docs/modules/_createIndexFinder.html
index 352a47eb7..bf998fe7b 100644
--- a/docs/modules/_createIndexFinder.html
+++ b/docs/modules/_createIndexFinder.html
@@ -849,9 +849,9 @@ _createIndexFinder.js
- import getLength from './_getLength.js';
-import { slice } from './_setup.js';
-import isNaN from './isNaN.js';
+ import getLength from './_getLength.js';
+import { slice } from './_setup.js';
+import isNaN from './isNaN.js';
@@ -866,27 +866,27 @@ _createIndexFinder.js
- export default function createIndexFinder(dir, predicateFind, sortedIndex) {
- return function(array, item, idx) {
- var i = 0, length = getLength(array);
- if (typeof idx == 'number') {
+ export default function createIndexFinder(dir, predicateFind, sortedIndex) {
+ return function(array, item, idx) {
+ var i = 0, length = getLength(array);
+ if (typeof idx == 'number') {
if (dir > 0) {
- i = idx >= 0 ? idx : Math.max(idx + length, i);
+ i = idx >= 0 ? idx : Math.max(idx + length, i);
} else {
- length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;
+ length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;
}
} else if (sortedIndex && idx && length) {
- idx = sortedIndex(array, item);
- return array[idx] === item ? idx : -1;
+ idx = sortedIndex(array, item);
+ return array[idx] === item ? idx : -1;
}
if (item !== item) {
- idx = predicateFind(slice.call(array, i, length), isNaN);
- return idx >= 0 ? idx + i : -1;
+ idx = predicateFind(slice.call(array, i, length), isNaN);
+ return idx >= 0 ? idx + i : -1;
}
for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {
if (array[idx] === item) return idx;
}
- return -1;
+ return -1;
};
}
diff --git a/docs/modules/_createPredicateIndexFinder.html b/docs/modules/_createPredicateIndexFinder.html
index 49d8eb8b9..459d9dbf8 100644
--- a/docs/modules/_createPredicateIndexFinder.html
+++ b/docs/modules/_createPredicateIndexFinder.html
@@ -849,8 +849,8 @@ _createPredicateIndexFinder.js
- import cb from './_cb.js';
-import getLength from './_getLength.js';
+ import cb from './_cb.js';
+import getLength from './_getLength.js';
@@ -865,15 +865,15 @@ _createPredicateIndexFinder.js
- export default function createPredicateIndexFinder(dir) {
- return function(array, predicate, context) {
- predicate = cb(predicate, context);
- var length = getLength(array);
- var index = dir > 0 ? 0 : length - 1;
- for (; index >= 0 && index < length; index += dir) {
- if (predicate(array[index], index, array)) return index;
+ export default function createPredicateIndexFinder(dir) {
+ return function(array, predicate, context) {
+ predicate = cb(predicate, context);
+ var length = getLength(array);
+ var index = dir > 0 ? 0 : length - 1;
+ for (; index >= 0 && index < length; index += dir) {
+ if (predicate(array[index], index, array)) return index;
}
- return -1;
+ return -1;
};
}
diff --git a/docs/modules/_createReduce.html b/docs/modules/_createReduce.html
index 32045c305..6731a74d1 100644
--- a/docs/modules/_createReduce.html
+++ b/docs/modules/_createReduce.html
@@ -849,9 +849,9 @@ _createReduce.js
- import isArrayLike from './_isArrayLike.js';
-import keys from './keys.js';
-import optimizeCb from './_optimizeCb.js';
+ import isArrayLike from './_isArrayLike.js';
+import keys from './keys.js';
+import optimizeCb from './_optimizeCb.js';
@@ -866,7 +866,7 @@ _createReduce.js
- export default function createReduce(dir) {
+ export default function createReduce(dir) {
@@ -882,9 +882,9 @@ _createReduce.js
- var reducer = function(obj, iteratee, memo, initial) {
- var _keys = !isArrayLike(obj) && keys(obj),
- length = (_keys || obj).length,
+ var reducer = function(obj, iteratee, memo, initial) {
+ var _keys = !isArrayLike(obj) && keys(obj),
+ length = (_keys || obj).length,
index = dir > 0 ? 0 : length - 1;
if (!initial) {
memo = obj[_keys ? _keys[index] : index];
@@ -892,14 +892,14 @@ _createReduce.js
}
for (; index >= 0 && index < length; index += dir) {
var currentKey = _keys ? _keys[index] : index;
- memo = iteratee(memo, obj[currentKey], currentKey, obj);
+ memo = iteratee(memo, obj[currentKey], currentKey, obj);
}
return memo;
};
- return function(obj, iteratee, memo, context) {
- var initial = arguments.length >= 3;
- return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);
+ return function(obj, iteratee, memo, context) {
+ var initial = arguments.length >= 3;
+ return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);
};
}
diff --git a/docs/modules/_createSizePropertyCheck.html b/docs/modules/_createSizePropertyCheck.html
index f7da8049c..6e3d20798 100644
--- a/docs/modules/_createSizePropertyCheck.html
+++ b/docs/modules/_createSizePropertyCheck.html
@@ -849,7 +849,7 @@ _createSizePropertyCheck.js
- import { MAX_ARRAY_INDEX } from './_setup.js';
+ import { MAX_ARRAY_INDEX } from './_setup.js';
@@ -864,10 +864,10 @@ _createSizePropertyCheck.js
- export default function createSizePropertyCheck(getSizeProperty) {
- return function(collection) {
- var sizeProperty = getSizeProperty(collection);
- return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;
+ export default function createSizePropertyCheck(getSizeProperty) {
+ return function(collection) {
+ var sizeProperty = getSizeProperty(collection);
+ return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;
}
}
diff --git a/docs/modules/_deepGet.html b/docs/modules/_deepGet.html
index c836477d6..b56e06c24 100644
--- a/docs/modules/_deepGet.html
+++ b/docs/modules/_deepGet.html
@@ -850,8 +850,8 @@ _deepGet.js
- export default function deepGet(obj, path) {
- var length = path.length;
+ export default function deepGet(obj, path) {
+ var length = path.length;
for (var i = 0; i < length; i++) {
if (obj == null) return void 0;
obj = obj[path[i]];
diff --git a/docs/modules/_escapeMap.html b/docs/modules/_escapeMap.html
index 7a5542ed5..6484eadf5 100644
--- a/docs/modules/_escapeMap.html
+++ b/docs/modules/_escapeMap.html
@@ -851,12 +851,12 @@ _escapeMap.js
export default {
- '&': '&',
- '<': '<',
- '>': '>',
- '"': '"',
- "'": ''',
- '`': '`'
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ "'": ''',
+ '`': '`'
};
diff --git a/docs/modules/_executeBound.html b/docs/modules/_executeBound.html
index 6c8293136..9f945f1f8 100644
--- a/docs/modules/_executeBound.html
+++ b/docs/modules/_executeBound.html
@@ -849,8 +849,8 @@ _executeBound.js
- import baseCreate from './_baseCreate.js';
-import isObject from './isObject.js';
+ import baseCreate from './_baseCreate.js';
+import isObject from './isObject.js';
@@ -867,11 +867,11 @@ _executeBound.js
- export default function executeBound(sourceFunc, boundFunc, context, callingContext, args) {
- if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);
- var self = baseCreate(sourceFunc.prototype);
- var result = sourceFunc.apply(self, args);
- if (isObject(result)) return result;
+ export default function executeBound(sourceFunc, boundFunc, context, callingContext, args) {
+ if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);
+ var self = baseCreate(sourceFunc.prototype);
+ var result = sourceFunc.apply(self, args);
+ if (isObject(result)) return result;
return self;
}
diff --git a/docs/modules/_flatten.html b/docs/modules/_flatten.html
index dc1772830..5534fcdee 100644
--- a/docs/modules/_flatten.html
+++ b/docs/modules/_flatten.html
@@ -849,10 +849,10 @@ _flatten.js
- import getLength from './_getLength.js';
-import isArrayLike from './_isArrayLike.js';
-import isArray from './isArray.js';
-import isArguments from './isArguments.js';
+ import getLength from './_getLength.js';
+import isArrayLike from './_isArrayLike.js';
+import isArray from './isArray.js';
+import isArguments from './isArguments.js';
@@ -867,17 +867,17 @@ _flatten.js
- export default function flatten(input, depth, strict, output) {
+ export default function flatten(input, depth, strict, output) {
output = output || [];
if (!depth && depth !== 0) {
- depth = Infinity;
+ depth = Infinity;
} else if (depth <= 0) {
- return output.concat(input);
+ return output.concat(input);
}
- var idx = output.length;
- for (var i = 0, length = getLength(input); i < length; i++) {
+ var idx = output.length;
+ for (var i = 0, length = getLength(input); i < length; i++) {
var value = input[i];
- if (isArrayLike(value) && (isArray(value) || isArguments(value))) {
+ if (isArrayLike(value) && (isArray(value) || isArguments(value))) {
@@ -893,10 +893,10 @@ _flatten.js
if (depth > 1) {
- flatten(value, depth - 1, strict, output);
- idx = output.length;
+ flatten(value, depth - 1, strict, output);
+ idx = output.length;
} else {
- var j = 0, len = value.length;
+ var j = 0, len = value.length;
while (j < len) output[idx++] = value[j++];
}
} else if (!strict) {
diff --git a/docs/modules/_getByteLength.html b/docs/modules/_getByteLength.html
index d588e0014..6c2600052 100644
--- a/docs/modules/_getByteLength.html
+++ b/docs/modules/_getByteLength.html
@@ -849,7 +849,7 @@ _getByteLength.js
- import shallowProperty from './_shallowProperty.js';
+ import shallowProperty from './_shallowProperty.js';
@@ -864,7 +864,7 @@ _getByteLength.js
- export default shallowProperty('byteLength');
+ export default shallowProperty('byteLength');
diff --git a/docs/modules/_getLength.html b/docs/modules/_getLength.html
index b11c5ad9d..b437d95d6 100644
--- a/docs/modules/_getLength.html
+++ b/docs/modules/_getLength.html
@@ -849,7 +849,7 @@ _getLength.js
- import shallowProperty from './_shallowProperty.js';
+ import shallowProperty from './_shallowProperty.js';
@@ -864,7 +864,7 @@ _getLength.js
export default shallowProperty('length');export default shallowProperty('length');import cb from './_cb.js';
-import each from './each.js';import cb from './_cb.js';
+import each from './each.js';export default function group(behavior, partition) {
- return function(obj, iteratee, context) {
+ export default function group(behavior, partition) {
+ return function(obj, iteratee, context) {
var result = partition ? [[], []] : {};
- iteratee = cb(iteratee, context);
- each(obj, function(value, index) {
- var key = iteratee(value, index, obj);
- behavior(result, value, key);
+ iteratee = cb(iteratee, context);
+ each(obj, function(value, index) {
+ var key = iteratee(value, index, obj);
+ behavior(result, value, key);
});
return result;
};
diff --git a/docs/modules/_has.html b/docs/modules/_has.html
index f324213fd..66a3220d5 100644
--- a/docs/modules/_has.html
+++ b/docs/modules/_has.html
@@ -849,7 +849,7 @@ _has.js
- import { hasOwnProperty } from './_setup.js';
+ import { hasOwnProperty } from './_setup.js';
@@ -864,8 +864,8 @@ _has.js
- export default function has(obj, key) {
- return obj != null && hasOwnProperty.call(obj, key);
+ export default function has(obj, key) {
+ return obj != null && hasOwnProperty.call(obj, key);
}
diff --git a/docs/modules/_hasObjectTag.html b/docs/modules/_hasObjectTag.html
index fb7cf31b8..a39b6491e 100644
--- a/docs/modules/_hasObjectTag.html
+++ b/docs/modules/_hasObjectTag.html
@@ -849,9 +849,9 @@ _hasObjectTag.js
- import tagTester from './_tagTester.js';
+ import tagTester from './_tagTester.js';
-export default tagTester('Object');
+export default tagTester('Object');
diff --git a/docs/modules/_isArrayLike.html b/docs/modules/_isArrayLike.html
index 17c63d540..e3227aada 100644
--- a/docs/modules/_isArrayLike.html
+++ b/docs/modules/_isArrayLike.html
@@ -849,8 +849,8 @@ _isArrayLike.js
- import createSizePropertyCheck from './_createSizePropertyCheck.js';
-import getLength from './_getLength.js';
+ import createSizePropertyCheck from './_createSizePropertyCheck.js';
+import getLength from './_getLength.js';
@@ -868,7 +868,7 @@ _isArrayLike.js
export default createSizePropertyCheck(getLength);export default createSizePropertyCheck(getLength);import createSizePropertyCheck from './_createSizePropertyCheck.js';
-import getByteLength from './_getByteLength.js';import createSizePropertyCheck from './_createSizePropertyCheck.js';
+import getByteLength from './_getByteLength.js';export default createSizePropertyCheck(getByteLength);export default createSizePropertyCheck(getByteLength);export default function keyInObj(value, key, obj) {
+ export default function keyInObj(value, key, obj) {
return key in obj;
}
diff --git a/docs/modules/_methodFingerprint.html b/docs/modules/_methodFingerprint.html
index a6b2a4b8a..30cf83a28 100644
--- a/docs/modules/_methodFingerprint.html
+++ b/docs/modules/_methodFingerprint.html
@@ -849,9 +849,9 @@ _methodFingerprint.js
import getLength from './_getLength.js';
-import isFunction from './isFunction.js';
-import allKeys from './allKeys.js';import getLength from './_getLength.js';
+import isFunction from './isFunction.js';
+import allKeys from './allKeys.js';export function ie11fingerprint(methods) {
- var length = getLength(methods);
- return function(obj) {
+ export function ie11fingerprint(methods) {
+ var length = getLength(methods);
+ return function(obj) {
if (obj == null) return false;
@@ -887,10 +887,10 @@ _methodFingerprint.js
var keys = allKeys(obj);
- if (getLength(keys)) return false;
- for (var i = 0; i < length; i++) {
- if (!isFunction(obj[methods[i]])) return false;
+ var keys = allKeys(obj);
+ if (getLength(keys)) return false;
+ for (var i = 0; i < length; i++) {
+ if (!isFunction(obj[methods[i]])) return false;
}
@@ -908,7 +908,7 @@ _methodFingerprint.js
return methods !== weakMapMethods || !isFunction(obj[forEachName]);
+ return methods !== weakMapMethods || !isFunction(obj[forEachName]);
};
}
@@ -926,10 +926,10 @@ _methodFingerprint.js
var forEachName = 'forEach',
- hasName = 'has',
- commonInit = ['clear', 'delete'],
- mapTail = ['get', hasName, 'set'];var forEachName = 'forEach',
+ hasName = 'has',
+ commonInit = ['clear', 'delete'],
+ mapTail = ['get', hasName, 'set'];export var mapMethods = commonInit.concat(forEachName, mapTail),
- weakMapMethods = commonInit.concat(mapTail),
- setMethods = ['add'].concat(commonInit, forEachName, hasName);export var mapMethods = commonInit.concat(forEachName, mapTail),
+ weakMapMethods = commonInit.concat(mapTail),
+ setMethods = ['add'].concat(commonInit, forEachName, hasName);export default function optimizeCb(func, context, argCount) {
+ export default function optimizeCb(func, context, argCount) {
if (context === void 0) return func;
switch (argCount == null ? 3 : argCount) {
- case 1: return function(value) {
- return func.call(context, value);
+ case 1: return function(value) {
+ return func.call(context, value);
};
@@ -872,15 +872,15 @@ _optimizeCb.js
case 3: return function(value, index, collection) {
- return func.call(context, value, index, collection);
+ case 3: return function(value, index, collection) {
+ return func.call(context, value, index, collection);
};
- case 4: return function(accumulator, value, index, collection) {
- return func.call(context, accumulator, value, index, collection);
+ case 4: return function(accumulator, value, index, collection) {
+ return func.call(context, accumulator, value, index, collection);
};
}
- return function() {
- return func.apply(context, arguments);
+ return function() {
+ return func.apply(context, arguments);
};
}
diff --git a/docs/modules/_setup.html b/docs/modules/_setup.html
index ed95fc944..5bcb72eec 100644
--- a/docs/modules/_setup.html
+++ b/docs/modules/_setup.html
@@ -850,7 +850,7 @@ _setup.js
export var VERSION = '1.13.2';export var VERSION = '1.13.7';export var root = typeof self == 'object' && self.self === self && self ||
- typeof global == 'object' && global.global === global && global ||
- Function('return this')() ||
+ export var root = (typeof self == 'object' && self.self === self && self) ||
+ (typeof global == 'object' && global.global === global && global) ||
+ Function('return this')() ||
{};
@@ -885,8 +885,8 @@ _setup.js
export var ArrayProto = Array.prototype, ObjProto = Object.prototype;
-export var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;export var ArrayProto = Array.prototype, ObjProto = Object.prototype;
+export var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;export var push = ArrayProto.push,
- slice = ArrayProto.slice,
- toString = ObjProto.toString,
- hasOwnProperty = ObjProto.hasOwnProperty;export var push = ArrayProto.push,
+ slice = ArrayProto.slice,
+ toString = ObjProto.toString,
+ hasOwnProperty = ObjProto.hasOwnProperty;export var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined',
- supportsDataView = typeof DataView !== 'undefined';export var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined',
+ supportsDataView = typeof DataView !== 'undefined';export var nativeIsArray = Array.isArray,
- nativeKeys = Object.keys,
- nativeCreate = Object.create,
- nativeIsView = supportsArrayBuffer && ArrayBuffer.isView;export var nativeIsArray = Array.isArray,
+ nativeKeys = Object.keys,
+ nativeCreate = Object.create,
+ nativeIsView = supportsArrayBuffer && ArrayBuffer.isView;export var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');
-export var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',
- 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];export var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');
+export var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',
+ 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];export var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;export var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;export default function shallowProperty(key) {
- return function(obj) {
+ export default function shallowProperty(key) {
+ return function(obj) {
return obj == null ? void 0 : obj[key];
};
}
diff --git a/docs/modules/_stringTagBug.html b/docs/modules/_stringTagBug.html
index 5fd17e996..aed5df079 100644
--- a/docs/modules/_stringTagBug.html
+++ b/docs/modules/_stringTagBug.html
@@ -849,8 +849,8 @@ _stringTagBug.js
import { supportsDataView } from './_setup.js';
-import hasObjectTag from './_hasObjectTag.js';import { supportsDataView } from './_setup.js';
+import hasObjectTag from './_hasObjectTag.js';In IE 10 - Edge 13, DataView has string tag '[object Object]'.
In IE 11, the most common among them, this problem also applies to
-Map, WeakMap and Set.
Map, WeakMap and Set.
+Also, there are cases where an application can override the native
+DataView object, in cases like that we canât use the constructor
+safely and should just rely on alternate DataView checks
- export var hasStringTagBug = (
- supportsDataView && hasObjectTag(new DataView(new ArrayBuffer(8)))
+ export var hasDataViewBug = (
+ supportsDataView && (!/\[native code\]/.test(String(DataView)) || hasObjectTag(new DataView(new ArrayBuffer(8))))
),
- isIE11 = (typeof Map !== 'undefined' && hasObjectTag(new Map));
+ isIE11 = (typeof Map !== 'undefined' && hasObjectTag(new Map));import { toString } from './_setup.js';import { toString } from './_setup.js';export default function tagTester(name) {
- var tag = '[object ' + name + ']';
- return function(obj) {
- return toString.call(obj) === tag;
+ export default function tagTester(name) {
+ var tag = '[object ' + name + ']';
+ return function(obj) {
+ return toString.call(obj) === tag;
};
}
diff --git a/docs/modules/_toBufferView.html b/docs/modules/_toBufferView.html
index c26cfdf79..80fa4e324 100644
--- a/docs/modules/_toBufferView.html
+++ b/docs/modules/_toBufferView.html
@@ -849,7 +849,7 @@ _toBufferView.js
import getByteLength from './_getByteLength.js';import getByteLength from './_getByteLength.js';export default function toBufferView(bufferSource) {
- return new Uint8Array(
- bufferSource.buffer || bufferSource,
- bufferSource.byteOffset || 0,
- getByteLength(bufferSource)
+ export default function toBufferView(bufferSource) {
+ return new Uint8Array(
+ bufferSource.buffer || bufferSource,
+ bufferSource.byteOffset || 0,
+ getByteLength(bufferSource)
);
}
diff --git a/docs/modules/_toPath.html b/docs/modules/_toPath.html
index 4ce04f24f..40c0586a2 100644
--- a/docs/modules/_toPath.html
+++ b/docs/modules/_toPath.html
@@ -849,8 +849,8 @@ _toPath.js
import _ from './underscore.js';
-import './toPath.js';import _ from './underscore.js';
+import './toPath.js';export default function toPath(path) {
- return _.toPath(path);
+ export default function toPath(path) {
+ return _.toPath(path);
}
diff --git a/docs/modules/_unescapeMap.html b/docs/modules/_unescapeMap.html
index fcfb01e05..fa97de10b 100644
--- a/docs/modules/_unescapeMap.html
+++ b/docs/modules/_unescapeMap.html
@@ -849,8 +849,8 @@ _unescapeMap.js
import invert from './invert.js';
-import escapeMap from './_escapeMap.js';import invert from './invert.js';
+import escapeMap from './_escapeMap.js';export default invert(escapeMap);export default invert(escapeMap);export default function after(times, func) {
- return function() {
+ export default function after(times, func) {
+ return function() {
if (--times < 1) {
- return func.apply(this, arguments);
+ return func.apply(this, arguments);
}
};
}
diff --git a/docs/modules/allKeys.html b/docs/modules/allKeys.html
index add22cfcc..ba69bb9fa 100644
--- a/docs/modules/allKeys.html
+++ b/docs/modules/allKeys.html
@@ -849,9 +849,9 @@ allKeys.js
import isObject from './isObject.js';
-import { hasEnumBug } from './_setup.js';
-import collectNonEnumProps from './_collectNonEnumProps.js';import isObject from './isObject.js';
+import { hasEnumBug } from './_setup.js';
+import collectNonEnumProps from './_collectNonEnumProps.js';export default function allKeys(obj) {
- if (!isObject(obj)) return [];
+ export default function allKeys(obj) {
+ if (!isObject(obj)) return [];
var keys = [];
- for (var key in obj) keys.push(key);
+ for (var key in obj) keys.push(key); if (hasEnumBug) collectNonEnumProps(obj, keys);
+ if (hasEnumBug) collectNonEnumProps(obj, keys);
return keys;
}
diff --git a/docs/modules/before.html b/docs/modules/before.html
index bee05c303..2244df7d3 100644
--- a/docs/modules/before.html
+++ b/docs/modules/before.html
@@ -851,11 +851,11 @@ before.js
export default function before(times, func) {
+ export default function before(times, func) {
var memo;
- return function() {
+ return function() {
if (--times > 0) {
- memo = func.apply(this, arguments);
+ memo = func.apply(this, arguments);
}
if (times <= 1) func = null;
return memo;
diff --git a/docs/modules/bind.html b/docs/modules/bind.html
index 103e368eb..26a83567f 100644
--- a/docs/modules/bind.html
+++ b/docs/modules/bind.html
@@ -849,9 +849,9 @@ bind.js
- import restArguments from './restArguments.js';
-import isFunction from './isFunction.js';
-import executeBound from './_executeBound.js';
+ import restArguments from './restArguments.js';
+import isFunction from './isFunction.js';
+import executeBound from './_executeBound.js';
@@ -867,10 +867,10 @@ bind.js
- export default restArguments(function(func, context, args) {
- if (!isFunction(func)) throw new TypeError('Bind must be called on a function');
- var bound = restArguments(function(callArgs) {
- return executeBound(func, bound, context, this, args.concat(callArgs));
+ export default restArguments(function(func, context, args) {
+ if (!isFunction(func)) throw new TypeError('Bind must be called on a function');
+ var bound = restArguments(function(callArgs) {
+ return executeBound(func, bound, context, this, args.concat(callArgs));
});
return bound;
});
diff --git a/docs/modules/bindAll.html b/docs/modules/bindAll.html
index 0e03ffbd4..f034b1d85 100644
--- a/docs/modules/bindAll.html
+++ b/docs/modules/bindAll.html
@@ -849,9 +849,9 @@ bindAll.js
- import restArguments from './restArguments.js';
-import flatten from './_flatten.js';
-import bind from './bind.js';
+ import restArguments from './restArguments.js';
+import flatten from './_flatten.js';
+import bind from './bind.js';
@@ -868,13 +868,13 @@ bindAll.js
- export default restArguments(function(obj, keys) {
- keys = flatten(keys, false, false);
- var index = keys.length;
- if (index < 1) throw new Error('bindAll must be passed function names');
+ export default restArguments(function(obj, keys) {
+ keys = flatten(keys, false, false);
+ var index = keys.length;
+ if (index < 1) throw new Error('bindAll must be passed function names');
while (index--) {
var key = keys[index];
- obj[key] = bind(obj[key], obj);
+ obj[key] = bind(obj[key], obj);
}
return obj;
});
diff --git a/docs/modules/chain.html b/docs/modules/chain.html
index 40e6eb62a..cbead05c2 100644
--- a/docs/modules/chain.html
+++ b/docs/modules/chain.html
@@ -849,7 +849,7 @@ chain.js
- import _ from './underscore.js';
+ import _ from './underscore.js';
@@ -864,9 +864,9 @@ chain.js
- export default function chain(obj) {
- var instance = _(obj);
- instance._chain = true;
+ export default function chain(obj) {
+ var instance = _(obj);
+ instance._chain = true;
return instance;
}
diff --git a/docs/modules/chunk.html b/docs/modules/chunk.html
index d7e7841fd..f83955155 100644
--- a/docs/modules/chunk.html
+++ b/docs/modules/chunk.html
@@ -849,7 +849,7 @@ chunk.js
- import { slice } from './_setup.js';
+ import { slice } from './_setup.js';
@@ -865,12 +865,12 @@ chunk.js
- export default function chunk(array, count) {
+ export default function chunk(array, count) {
if (count == null || count < 1) return [];
var result = [];
- var i = 0, length = array.length;
+ var i = 0, length = array.length;
while (i < length) {
- result.push(slice.call(array, i, i += count));
+ result.push(slice.call(array, i, i += count));
}
return result;
}
diff --git a/docs/modules/clone.html b/docs/modules/clone.html
index 5ca8a68c5..6714edeb9 100644
--- a/docs/modules/clone.html
+++ b/docs/modules/clone.html
@@ -849,9 +849,9 @@ clone.js
- import isObject from './isObject.js';
-import isArray from './isArray.js';
-import extend from './extend.js';
+ import isObject from './isObject.js';
+import isArray from './isArray.js';
+import extend from './extend.js';
@@ -866,9 +866,9 @@ clone.js
- export default function clone(obj) {
- if (!isObject(obj)) return obj;
- return isArray(obj) ? obj.slice() : extend({}, obj);
+ export default function clone(obj) {
+ if (!isObject(obj)) return obj;
+ return isArray(obj) ? obj.slice() : extend({}, obj);
}
diff --git a/docs/modules/compact.html b/docs/modules/compact.html
index 86a13f506..7e771208c 100644
--- a/docs/modules/compact.html
+++ b/docs/modules/compact.html
@@ -849,7 +849,7 @@ compact.js
- import filter from './filter.js';
+ import filter from './filter.js';
@@ -864,8 +864,8 @@ compact.js
- export default function compact(array) {
- return filter(array, Boolean);
+ export default function compact(array) {
+ return filter(array, Boolean);
}
diff --git a/docs/modules/compose.html b/docs/modules/compose.html
index 66bb1c1e6..0c67915f3 100644
--- a/docs/modules/compose.html
+++ b/docs/modules/compose.html
@@ -851,13 +851,13 @@ compose.js
- export default function compose() {
- var args = arguments;
- var start = args.length - 1;
- return function() {
+ export default function compose() {
+ var args = arguments;
+ var start = args.length - 1;
+ return function() {
var i = start;
- var result = args[start].apply(this, arguments);
- while (i--) result = args[i].call(this, result);
+ var result = args[start].apply(this, arguments);
+ while (i--) result = args[i].call(this, result);
return result;
};
}
diff --git a/docs/modules/constant.html b/docs/modules/constant.html
index 42d899f78..04826ebe2 100644
--- a/docs/modules/constant.html
+++ b/docs/modules/constant.html
@@ -850,8 +850,8 @@ constant.js
- export default function constant(value) {
- return function() {
+ export default function constant(value) {
+ return function() {
return value;
};
}
diff --git a/docs/modules/contains.html b/docs/modules/contains.html
index d538fd2a5..5a994851e 100644
--- a/docs/modules/contains.html
+++ b/docs/modules/contains.html
@@ -849,9 +849,9 @@ contains.js
- import isArrayLike from './_isArrayLike.js';
-import values from './values.js';
-import indexOf from './indexOf.js';
+ import isArrayLike from './_isArrayLike.js';
+import values from './values.js';
+import indexOf from './indexOf.js';
@@ -866,10 +866,10 @@ contains.js
- export default function contains(obj, item, fromIndex, guard) {
- if (!isArrayLike(obj)) obj = values(obj);
- if (typeof fromIndex != 'number' || guard) fromIndex = 0;
- return indexOf(obj, item, fromIndex) >= 0;
+ export default function contains(obj, item, fromIndex, guard) {
+ if (!isArrayLike(obj)) obj = values(obj);
+ if (typeof fromIndex != 'number' || guard) fromIndex = 0;
+ return indexOf(obj, item, fromIndex) >= 0;
}
diff --git a/docs/modules/countBy.html b/docs/modules/countBy.html
index 8eae2f4f5..98349d991 100644
--- a/docs/modules/countBy.html
+++ b/docs/modules/countBy.html
@@ -849,8 +849,8 @@ countBy.js
- import group from './_group.js';
-import has from './_has.js';
+ import group from './_group.js';
+import has from './_has.js';
@@ -867,8 +867,8 @@ countBy.js
- export default group(function(result, value, key) {
- if (has(result, key)) result[key]++; else result[key] = 1;
+ export default group(function(result, value, key) {
+ if (has(result, key)) result[key]++; else result[key] = 1;
});
diff --git a/docs/modules/create.html b/docs/modules/create.html
index 6886bb8c1..3f7e037dd 100644
--- a/docs/modules/create.html
+++ b/docs/modules/create.html
@@ -849,8 +849,8 @@ create.js
- import baseCreate from './_baseCreate.js';
-import extendOwn from './extendOwn.js';
+ import baseCreate from './_baseCreate.js';
+import extendOwn from './extendOwn.js';
@@ -867,9 +867,9 @@ create.js
- export default function create(prototype, props) {
- var result = baseCreate(prototype);
- if (props) extendOwn(result, props);
+ export default function create(prototype, props) {
+ var result = baseCreate(prototype);
+ if (props) extendOwn(result, props);
return result;
}
diff --git a/docs/modules/debounce.html b/docs/modules/debounce.html
index 0a08b47b2..d2baa6471 100644
--- a/docs/modules/debounce.html
+++ b/docs/modules/debounce.html
@@ -849,8 +849,8 @@ debounce.js
- import restArguments from './restArguments.js';
-import now from './now.js';
+ import restArguments from './restArguments.js';
+import now from './now.js';
@@ -868,16 +868,16 @@ debounce.js
- export default function debounce(func, wait, immediate) {
+ export default function debounce(func, wait, immediate) {
var timeout, previous, args, result, context;
- var later = function() {
- var passed = now() - previous;
+ var later = function() {
+ var passed = now() - previous;
if (wait > passed) {
- timeout = setTimeout(later, wait - passed);
- } else {
+ timeout = setTimeout(later, wait - passed);
+ } else {
timeout = null;
- if (!immediate) result = func.apply(context, args);
+ if (!immediate) result = func.apply(context, args);
@@ -896,19 +896,19 @@ debounce.js
}
};
- var debounced = restArguments(function(_args) {
- context = this;
+ var debounced = restArguments(function(_args) {
+ context = this;
args = _args;
- previous = now();
+ previous = now();
if (!timeout) {
- timeout = setTimeout(later, wait);
- if (immediate) result = func.apply(context, args);
+ timeout = setTimeout(later, wait);
+ if (immediate) result = func.apply(context, args);
}
- return result;
+ return result;
});
- debounced.cancel = function() {
- clearTimeout(timeout);
+ debounced.cancel = function() {
+ clearTimeout(timeout);
timeout = args = context = null;
};
diff --git a/docs/modules/defaults.html b/docs/modules/defaults.html
index a08d0e59a..76fa0605c 100644
--- a/docs/modules/defaults.html
+++ b/docs/modules/defaults.html
@@ -849,8 +849,8 @@ defaults.js
- import createAssigner from './_createAssigner.js';
-import allKeys from './allKeys.js';
+ import createAssigner from './_createAssigner.js';
+import allKeys from './allKeys.js';
@@ -865,7 +865,7 @@ defaults.js
- export default createAssigner(allKeys, true);
+ export default createAssigner(allKeys, true);
diff --git a/docs/modules/defer.html b/docs/modules/defer.html
index 9e4999544..ebeea9808 100644
--- a/docs/modules/defer.html
+++ b/docs/modules/defer.html
@@ -849,9 +849,9 @@ defer.js
import partial from './partial.js';
-import delay from './delay.js';
-import _ from './underscore.js';import partial from './partial.js';
+import delay from './delay.js';
+import _ from './underscore.js';export default partial(delay, _, 1);export default partial(delay, _, 1);import restArguments from './restArguments.js';import restArguments from './restArguments.js';export default restArguments(function(func, wait, args) {
- return setTimeout(function() {
- return func.apply(null, args);
+ export default restArguments(function(func, wait, args) {
+ return setTimeout(function() {
+ return func.apply(null, args);
}, wait);
});
diff --git a/docs/modules/difference.html b/docs/modules/difference.html
index 77b9bb7e0..95d13dc58 100644
--- a/docs/modules/difference.html
+++ b/docs/modules/difference.html
@@ -849,10 +849,10 @@ difference.js
import restArguments from './restArguments.js';
-import flatten from './_flatten.js';
-import filter from './filter.js';
-import contains from './contains.js';import restArguments from './restArguments.js';
+import flatten from './_flatten.js';
+import filter from './filter.js';
+import contains from './contains.js';export default restArguments(function(array, rest) {
- rest = flatten(rest, true, true);
- return filter(array, function(value){
- return !contains(rest, value);
+ export default restArguments(function(array, rest) {
+ rest = flatten(rest, true, true);
+ return filter(array, function(value){
+ return !contains(rest, value);
});
});
diff --git a/docs/modules/each.html b/docs/modules/each.html
index c50901990..a434f9151 100644
--- a/docs/modules/each.html
+++ b/docs/modules/each.html
@@ -849,9 +849,9 @@ each.js
import optimizeCb from './_optimizeCb.js';
-import isArrayLike from './_isArrayLike.js';
-import keys from './keys.js';import optimizeCb from './_optimizeCb.js';
+import isArrayLike from './_isArrayLike.js';
+import keys from './keys.js';export default function each(obj, iteratee, context) {
- iteratee = optimizeCb(iteratee, context);
+ export default function each(obj, iteratee, context) {
+ iteratee = optimizeCb(iteratee, context);
var i, length;
- if (isArrayLike(obj)) {
- for (i = 0, length = obj.length; i < length; i++) {
- iteratee(obj[i], i, obj);
+ if (isArrayLike(obj)) {
+ for (i = 0, length = obj.length; i < length; i++) {
+ iteratee(obj[i], i, obj);
}
} else {
- var _keys = keys(obj);
- for (i = 0, length = _keys.length; i < length; i++) {
- iteratee(obj[_keys[i]], _keys[i], obj);
+ var _keys = keys(obj);
+ for (i = 0, length = _keys.length; i < length; i++) {
+ iteratee(obj[_keys[i]], _keys[i], obj);
}
}
return obj;
diff --git a/docs/modules/escape.html b/docs/modules/escape.html
index 5daa6bd6f..6143cee98 100644
--- a/docs/modules/escape.html
+++ b/docs/modules/escape.html
@@ -849,8 +849,8 @@ escape.js
- import createEscaper from './_createEscaper.js';
-import escapeMap from './_escapeMap.js';
+ import createEscaper from './_createEscaper.js';
+import escapeMap from './_escapeMap.js';
@@ -865,7 +865,7 @@ escape.js
- export default createEscaper(escapeMap);
+ export default createEscaper(escapeMap);
diff --git a/docs/modules/every.html b/docs/modules/every.html
index f39774097..5f4855636 100644
--- a/docs/modules/every.html
+++ b/docs/modules/every.html
@@ -849,9 +849,9 @@ every.js
import cb from './_cb.js';
-import isArrayLike from './_isArrayLike.js';
-import keys from './keys.js';import cb from './_cb.js';
+import isArrayLike from './_isArrayLike.js';
+import keys from './keys.js';export default function every(obj, predicate, context) {
- predicate = cb(predicate, context);
- var _keys = !isArrayLike(obj) && keys(obj),
- length = (_keys || obj).length;
+ export default function every(obj, predicate, context) {
+ predicate = cb(predicate, context);
+ var _keys = !isArrayLike(obj) && keys(obj),
+ length = (_keys || obj).length;
for (var index = 0; index < length; index++) {
var currentKey = _keys ? _keys[index] : index;
- if (!predicate(obj[currentKey], currentKey, obj)) return false;
+ if (!predicate(obj[currentKey], currentKey, obj)) return false;
}
return true;
}
diff --git a/docs/modules/extend.html b/docs/modules/extend.html
index cde807721..2c5621dbe 100644
--- a/docs/modules/extend.html
+++ b/docs/modules/extend.html
@@ -849,8 +849,8 @@ extend.js
import createAssigner from './_createAssigner.js';
-import allKeys from './allKeys.js';import createAssigner from './_createAssigner.js';
+import allKeys from './allKeys.js';export default createAssigner(allKeys);export default createAssigner(allKeys);import createAssigner from './_createAssigner.js';
-import keys from './keys.js';import createAssigner from './_createAssigner.js';
+import keys from './keys.js';export default createAssigner(keys);export default createAssigner(keys);import cb from './_cb.js';
-import each from './each.js';import cb from './_cb.js';
+import each from './each.js';export default function filter(obj, predicate, context) {
+ export default function filter(obj, predicate, context) {
var results = [];
- predicate = cb(predicate, context);
- each(obj, function(value, index, list) {
- if (predicate(value, index, list)) results.push(value);
+ predicate = cb(predicate, context);
+ each(obj, function(value, index, list) {
+ if (predicate(value, index, list)) results.push(value);
});
return results;
}
diff --git a/docs/modules/find.html b/docs/modules/find.html
index 954d153cc..7e166297b 100644
--- a/docs/modules/find.html
+++ b/docs/modules/find.html
@@ -849,9 +849,9 @@ find.js
import isArrayLike from './_isArrayLike.js';
-import findIndex from './findIndex.js';
-import findKey from './findKey.js';import isArrayLike from './_isArrayLike.js';
+import findIndex from './findIndex.js';
+import findKey from './findKey.js';export default function find(obj, predicate, context) {
- var keyFinder = isArrayLike(obj) ? findIndex : findKey;
- var key = keyFinder(obj, predicate, context);
- if (key !== void 0 && key !== -1) return obj[key];
+ export default function find(obj, predicate, context) {
+ var keyFinder = isArrayLike(obj) ? findIndex : findKey;
+ var key = keyFinder(obj, predicate, context);
+ if (key !== void 0 && key !== -1) return obj[key];
}
diff --git a/docs/modules/findIndex.html b/docs/modules/findIndex.html
index 5bfc9df16..f192672ec 100644
--- a/docs/modules/findIndex.html
+++ b/docs/modules/findIndex.html
@@ -849,7 +849,7 @@ findIndex.js
import createPredicateIndexFinder from './_createPredicateIndexFinder.js';import createPredicateIndexFinder from './_createPredicateIndexFinder.js';export default createPredicateIndexFinder(1);export default createPredicateIndexFinder(1);import cb from './_cb.js';
-import keys from './keys.js';import cb from './_cb.js';
+import keys from './keys.js';export default function findKey(obj, predicate, context) {
- predicate = cb(predicate, context);
- var _keys = keys(obj), key;
- for (var i = 0, length = _keys.length; i < length; i++) {
+ export default function findKey(obj, predicate, context) {
+ predicate = cb(predicate, context);
+ var _keys = keys(obj), key;
+ for (var i = 0, length = _keys.length; i < length; i++) {
key = _keys[i];
- if (predicate(obj[key], key, obj)) return key;
+ if (predicate(obj[key], key, obj)) return key;
}
}
diff --git a/docs/modules/findLastIndex.html b/docs/modules/findLastIndex.html
index 526fabcdf..ced3b4eb9 100644
--- a/docs/modules/findLastIndex.html
+++ b/docs/modules/findLastIndex.html
@@ -849,7 +849,7 @@ findLastIndex.js
import createPredicateIndexFinder from './_createPredicateIndexFinder.js';import createPredicateIndexFinder from './_createPredicateIndexFinder.js';export default createPredicateIndexFinder(-1);export default createPredicateIndexFinder(-1);import find from './find.js';
-import matcher from './matcher.js';import find from './find.js';
+import matcher from './matcher.js';export default function findWhere(obj, attrs) {
- return find(obj, matcher(attrs));
+ export default function findWhere(obj, attrs) {
+ return find(obj, matcher(attrs));
}
diff --git a/docs/modules/first.html b/docs/modules/first.html
index fb7b74e09..c58a347fe 100644
--- a/docs/modules/first.html
+++ b/docs/modules/first.html
@@ -849,7 +849,7 @@ first.js
import initial from './initial.js';import initial from './initial.js';export default function first(array, n, guard) {
- if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
+ export default function first(array, n, guard) {
+ if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
if (n == null || guard) return array[0];
- return initial(array, array.length - n);
+ return initial(array, array.length - n);
}
diff --git a/docs/modules/flatten.html b/docs/modules/flatten.html
index 16fb06cd2..ab435eafd 100644
--- a/docs/modules/flatten.html
+++ b/docs/modules/flatten.html
@@ -849,7 +849,7 @@ flatten.js
import _flatten from './_flatten.js';import _flatten from './_flatten.js';export default function flatten(array, depth) {
- return _flatten(array, depth, false);
+ export default function flatten(array, depth) {
+ return _flatten(array, depth, false);
}
diff --git a/docs/modules/functions.html b/docs/modules/functions.html
index e39e6f3d6..9c995734f 100644
--- a/docs/modules/functions.html
+++ b/docs/modules/functions.html
@@ -849,7 +849,7 @@ functions.js
import isFunction from './isFunction.js';import isFunction from './isFunction.js';export default function functions(obj) {
+ export default function functions(obj) {
var names = [];
for (var key in obj) {
- if (isFunction(obj[key])) names.push(key);
+ if (isFunction(obj[key])) names.push(key);
}
- return names.sort();
+ return names.sort();
}
diff --git a/docs/modules/get.html b/docs/modules/get.html
index 91693a1c8..e3c1faa28 100644
--- a/docs/modules/get.html
+++ b/docs/modules/get.html
@@ -849,9 +849,9 @@ get.js
import toPath from './_toPath.js';
-import deepGet from './_deepGet.js';
-import isUndefined from './isUndefined.js';import toPath from './_toPath.js';
+import deepGet from './_deepGet.js';
+import isUndefined from './isUndefined.js';export default function get(object, path, defaultValue) {
- var value = deepGet(object, toPath(path));
- return isUndefined(value) ? defaultValue : value;
+ export default function get(object, path, defaultValue) {
+ var value = deepGet(object, toPath(path));
+ return isUndefined(value) ? defaultValue : value;
}
diff --git a/docs/modules/groupBy.html b/docs/modules/groupBy.html
index ceeaecdd7..812fa8346 100644
--- a/docs/modules/groupBy.html
+++ b/docs/modules/groupBy.html
@@ -849,8 +849,8 @@ groupBy.js
import group from './_group.js';
-import has from './_has.js';import group from './_group.js';
+import has from './_has.js';export default group(function(result, value, key) {
- if (has(result, key)) result[key].push(value); else result[key] = [value];
+ export default group(function(result, value, key) {
+ if (has(result, key)) result[key].push(value); else result[key] = [value];
});
diff --git a/docs/modules/has.html b/docs/modules/has.html
index 7762f47cf..7137637d6 100644
--- a/docs/modules/has.html
+++ b/docs/modules/has.html
@@ -849,8 +849,8 @@ has.js
import _has from './_has.js';
-import toPath from './_toPath.js';import _has from './_has.js';
+import toPath from './_toPath.js';export default function has(obj, path) {
- path = toPath(path);
- var length = path.length;
+ export default function has(obj, path) {
+ path = toPath(path);
+ var length = path.length;
for (var i = 0; i < length; i++) {
var key = path[i];
- if (!_has(obj, key)) return false;
+ if (!_has(obj, key)) return false;
obj = obj[key];
}
return !!length;
diff --git a/docs/modules/identity.html b/docs/modules/identity.html
index ea282f4da..a72356f8e 100644
--- a/docs/modules/identity.html
+++ b/docs/modules/identity.html
@@ -850,7 +850,7 @@ identity.js
- export default function identity(value) {
+ export default function identity(value) {
return value;
}
diff --git a/docs/modules/index-all.html b/docs/modules/index-all.html
index 0edbebdef..8fa744ead 100644
--- a/docs/modules/index-all.html
+++ b/docs/modules/index-all.html
@@ -856,7 +856,8 @@ ESM Exports
This module is the package entry point for ES module users. In other words,
it is the module they are interfacing with when they import from the whole
package instead of from a submodule, like this:
-import { map } from 'underscore';
+import { map } from 'underscore';
+
The difference with ./index-default, which is the package entry point for
CommonJS, AMD and UMD users, is purely technical. In ES modules, named and
default exports are considered to be siblings, so when you have a default
@@ -866,8 +867,8 @@
ESM Exports
- export { default } from './index-default.js';
-export * from './index.js';
+ export { default } from './index-default.js';
+export * from './index.js';
diff --git a/docs/modules/index-default.html b/docs/modules/index-default.html
index af4d3892b..d97372db0 100644
--- a/docs/modules/index-default.html
+++ b/docs/modules/index-default.html
@@ -859,18 +859,19 @@ Default Export
entry point for CommonJS and AMD users. In other words, this is (the source
of) the module you are interfacing with when you do any of the following:
// CommonJS
-var _ = require('underscore');
+var _ = require('underscore');
// AMD
-define(['underscore'], function(_) {...});
+define(['underscore'], function(_) {...});
// UMD in the browser
-// _ is available as a global variable
+// _ is available as a global variable
+
- import * as allExports from './index.js';
-import { mixin } from './index.js';
+ import * as allExports from './index.js';
+import { mixin } from './index.js';
@@ -885,7 +886,7 @@ Default Export
- var _ = mixin(allExports);
+ var _ = mixin(allExports);
@@ -900,7 +901,7 @@ Default Export
_._ = _;_._ = _;Underscore.js 1.13.2
+ Underscore.js 1.13.7
https://underscorejs.org
-(c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors
-Underscore may be freely distributed under the MIT license.
+(c) 2009-2024 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors
+Underscore may be freely distributed under the MIT license.
+
+
export { VERSION } from './_setup.js';
-export { default as restArguments } from './restArguments.js';export { VERSION } from './_setup.js';
+export { default as restArguments } from './restArguments.js';export { default as isObject } from './isObject.js';
-export { default as isNull } from './isNull.js';
-export { default as isUndefined } from './isUndefined.js';
-export { default as isBoolean } from './isBoolean.js';
-export { default as isElement } from './isElement.js';
-export { default as isString } from './isString.js';
-export { default as isNumber } from './isNumber.js';
-export { default as isDate } from './isDate.js';
-export { default as isRegExp } from './isRegExp.js';
-export { default as isError } from './isError.js';
-export { default as isSymbol } from './isSymbol.js';
-export { default as isArrayBuffer } from './isArrayBuffer.js';
-export { default as isDataView } from './isDataView.js';
-export { default as isArray } from './isArray.js';
-export { default as isFunction } from './isFunction.js';
-export { default as isArguments } from './isArguments.js';
-export { default as isFinite } from './isFinite.js';
-export { default as isNaN } from './isNaN.js';
-export { default as isTypedArray } from './isTypedArray.js';
-export { default as isEmpty } from './isEmpty.js';
-export { default as isMatch } from './isMatch.js';
-export { default as isEqual } from './isEqual.js';
-export { default as isMap } from './isMap.js';
-export { default as isWeakMap } from './isWeakMap.js';
-export { default as isSet } from './isSet.js';
-export { default as isWeakSet } from './isWeakSet.js';export { default as isObject } from './isObject.js';
+export { default as isNull } from './isNull.js';
+export { default as isUndefined } from './isUndefined.js';
+export { default as isBoolean } from './isBoolean.js';
+export { default as isElement } from './isElement.js';
+export { default as isString } from './isString.js';
+export { default as isNumber } from './isNumber.js';
+export { default as isDate } from './isDate.js';
+export { default as isRegExp } from './isRegExp.js';
+export { default as isError } from './isError.js';
+export { default as isSymbol } from './isSymbol.js';
+export { default as isArrayBuffer } from './isArrayBuffer.js';
+export { default as isDataView } from './isDataView.js';
+export { default as isArray } from './isArray.js';
+export { default as isFunction } from './isFunction.js';
+export { default as isArguments } from './isArguments.js';
+export { default as isFinite } from './isFinite.js';
+export { default as isNaN } from './isNaN.js';
+export { default as isTypedArray } from './isTypedArray.js';
+export { default as isEmpty } from './isEmpty.js';
+export { default as isMatch } from './isMatch.js';
+export { default as isEqual } from './isEqual.js';
+export { default as isMap } from './isMap.js';
+export { default as isWeakMap } from './isWeakMap.js';
+export { default as isSet } from './isSet.js';
+export { default as isWeakSet } from './isWeakSet.js';export { default as keys } from './keys.js';
-export { default as allKeys } from './allKeys.js';
-export { default as values } from './values.js';
-export { default as pairs } from './pairs.js';
-export { default as invert } from './invert.js';
+ export { default as keys } from './keys.js';
+export { default as allKeys } from './allKeys.js';
+export { default as values } from './values.js';
+export { default as pairs } from './pairs.js';
+export { default as invert } from './invert.js';
export { default as functions,
- default as methods } from './functions.js';
-export { default as extend } from './extend.js';
+ default as methods } from './functions.js';
+export { default as extend } from './extend.js';
export { default as extendOwn,
- default as assign } from './extendOwn.js';
-export { default as defaults } from './defaults.js';
-export { default as create } from './create.js';
-export { default as clone } from './clone.js';
-export { default as tap } from './tap.js';
-export { default as get } from './get.js';
-export { default as has } from './has.js';
-export { default as mapObject } from './mapObject.js';
+ default as assign } from './extendOwn.js';
+export { default as defaults } from './defaults.js';
+export { default as create } from './create.js';
+export { default as clone } from './clone.js';
+export { default as tap } from './tap.js';
+export { default as get } from './get.js';
+export { default as has } from './has.js';
+export { default as mapObject } from './mapObject.js';export { default as identity } from './identity.js';
-export { default as constant } from './constant.js';
-export { default as noop } from './noop.js';
-export { default as toPath } from './toPath.js';
-export { default as property } from './property.js';
-export { default as propertyOf } from './propertyOf.js';
+ export { default as identity } from './identity.js';
+export { default as constant } from './constant.js';
+export { default as noop } from './noop.js';
+export { default as toPath } from './toPath.js';
+export { default as property } from './property.js';
+export { default as propertyOf } from './propertyOf.js';
export { default as matcher,
- default as matches } from './matcher.js';
-export { default as times } from './times.js';
-export { default as random } from './random.js';
-export { default as now } from './now.js';
-export { default as escape } from './escape.js';
-export { default as unescape } from './unescape.js';
-export { default as templateSettings } from './templateSettings.js';
-export { default as template } from './template.js';
-export { default as result } from './result.js';
-export { default as uniqueId } from './uniqueId.js';
-export { default as chain } from './chain.js';
-export { default as iteratee } from './iteratee.js';
+ default as matches } from './matcher.js';
+export { default as times } from './times.js';
+export { default as random } from './random.js';
+export { default as now } from './now.js';
+export { default as escape } from './escape.js';
+export { default as unescape } from './unescape.js';
+export { default as templateSettings } from './templateSettings.js';
+export { default as template } from './template.js';
+export { default as result } from './result.js';
+export { default as uniqueId } from './uniqueId.js';
+export { default as chain } from './chain.js';
+export { default as iteratee } from './iteratee.js';export { default as partial } from './partial.js';
-export { default as bind } from './bind.js';
-export { default as bindAll } from './bindAll.js';
-export { default as memoize } from './memoize.js';
-export { default as delay } from './delay.js';
-export { default as defer } from './defer.js';
-export { default as throttle } from './throttle.js';
-export { default as debounce } from './debounce.js';
-export { default as wrap } from './wrap.js';
-export { default as negate } from './negate.js';
-export { default as compose } from './compose.js';
-export { default as after } from './after.js';
-export { default as before } from './before.js';
-export { default as once } from './once.js';export { default as partial } from './partial.js';
+export { default as bind } from './bind.js';
+export { default as bindAll } from './bindAll.js';
+export { default as memoize } from './memoize.js';
+export { default as delay } from './delay.js';
+export { default as defer } from './defer.js';
+export { default as throttle } from './throttle.js';
+export { default as debounce } from './debounce.js';
+export { default as wrap } from './wrap.js';
+export { default as negate } from './negate.js';
+export { default as compose } from './compose.js';
+export { default as after } from './after.js';
+export { default as before } from './before.js';
+export { default as once } from './once.js';export { default as findKey } from './findKey.js';
-export { default as findIndex } from './findIndex.js';
-export { default as findLastIndex } from './findLastIndex.js';
-export { default as sortedIndex } from './sortedIndex.js';
-export { default as indexOf } from './indexOf.js';
-export { default as lastIndexOf } from './lastIndexOf.js';
+ export { default as findKey } from './findKey.js';
+export { default as findIndex } from './findIndex.js';
+export { default as findLastIndex } from './findLastIndex.js';
+export { default as sortedIndex } from './sortedIndex.js';
+export { default as indexOf } from './indexOf.js';
+export { default as lastIndexOf } from './lastIndexOf.js';
export { default as find,
- default as detect } from './find.js';
-export { default as findWhere } from './findWhere.js';
+ default as detect } from './find.js';
+export { default as findWhere } from './findWhere.js';export { default as each,
- default as forEach } from './each.js';
+ default as forEach } from './each.js';
export { default as map,
- default as collect } from './map.js';
+ default as collect } from './map.js';
export { default as reduce,
default as foldl,
- default as inject } from './reduce.js';
+ default as inject } from './reduce.js';
export { default as reduceRight,
- default as foldr } from './reduceRight.js';
+ default as foldr } from './reduceRight.js';
export { default as filter,
- default as select } from './filter.js';
-export { default as reject } from './reject.js';
+ default as select } from './filter.js';
+export { default as reject } from './reject.js';
export { default as every,
- default as all } from './every.js';
+ default as all } from './every.js';
export { default as some,
- default as any } from './some.js';
+ default as any } from './some.js';
export { default as contains,
default as includes,
- default as include } from './contains.js';
-export { default as invoke } from './invoke.js';
-export { default as pluck } from './pluck.js';
-export { default as where } from './where.js';
-export { default as max } from './max.js';
-export { default as min } from './min.js';
-export { default as shuffle } from './shuffle.js';
-export { default as sample } from './sample.js';
-export { default as sortBy } from './sortBy.js';
-export { default as groupBy } from './groupBy.js';
-export { default as indexBy } from './indexBy.js';
-export { default as countBy } from './countBy.js';
-export { default as partition } from './partition.js';
-export { default as toArray } from './toArray.js';
-export { default as size } from './size.js';export { default as pick } from './pick.js';
-export { default as omit } from './omit.js';export { default as pick } from './pick.js';
+export { default as omit } from './omit.js';export { default as first,
default as head,
- default as take } from './first.js';
-export { default as initial } from './initial.js';
-export { default as last } from './last.js';
+ default as take } from './first.js';
+export { default as initial } from './initial.js';
+export { default as last } from './last.js';
export { default as rest,
default as tail,
- default as drop } from './rest.js';
-export { default as compact } from './compact.js';
-export { default as flatten } from './flatten.js';
-export { default as without } from './without.js';
+ default as drop } from './rest.js';
+export { default as compact } from './compact.js';
+export { default as flatten } from './flatten.js';
+export { default as without } from './without.js';
export { default as uniq,
- default as unique } from './uniq.js';
-export { default as union } from './union.js';
-export { default as intersection } from './intersection.js';
-export { default as difference } from './difference.js';
+ default as unique } from './uniq.js';
+export { default as union } from './union.js';
+export { default as intersection } from './intersection.js';
+export { default as difference } from './difference.js';
export { default as unzip,
- default as transpose } from './unzip.js';
-export { default as zip } from './zip.js';
-export { default as object } from './object.js';
-export { default as range } from './range.js';
-export { default as chunk } from './chunk.js';export { default as mixin } from './mixin.js';
-export { default } from './underscore-array-methods.js';export { default as mixin } from './mixin.js';
+export { default } from './underscore-array-methods.js';import group from './_group.js';import group from './_group.js';export default group(function(result, value, key) {
+ export default group(function(result, value, key) {
result[key] = value;
});
diff --git a/docs/modules/indexOf.html b/docs/modules/indexOf.html
index 4f0473594..8627c856e 100644
--- a/docs/modules/indexOf.html
+++ b/docs/modules/indexOf.html
@@ -849,9 +849,9 @@ indexOf.js
import sortedIndex from './sortedIndex.js';
-import findIndex from './findIndex.js';
-import createIndexFinder from './_createIndexFinder.js';import sortedIndex from './sortedIndex.js';
+import findIndex from './findIndex.js';
+import createIndexFinder from './_createIndexFinder.js';export default createIndexFinder(1, findIndex, sortedIndex);export default createIndexFinder(1, findIndex, sortedIndex);import { slice } from './_setup.js';import { slice } from './_setup.js';export default function initial(array, n, guard) {
- return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
+ export default function initial(array, n, guard) {
+ return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
}
diff --git a/docs/modules/intersection.html b/docs/modules/intersection.html
index e8a3bab8b..f5d00c03a 100644
--- a/docs/modules/intersection.html
+++ b/docs/modules/intersection.html
@@ -849,8 +849,8 @@ intersection.js
import getLength from './_getLength.js';
-import contains from './contains.js';import getLength from './_getLength.js';
+import contains from './contains.js';export default function intersection(array) {
+ export default function intersection(array) {
var result = [];
- var argsLength = arguments.length;
- for (var i = 0, length = getLength(array); i < length; i++) {
+ var argsLength = arguments.length;
+ for (var i = 0, length = getLength(array); i < length; i++) {
var item = array[i];
- if (contains(result, item)) continue;
+ if (contains(result, item)) continue;
var j;
for (j = 1; j < argsLength; j++) {
- if (!contains(arguments[j], item)) break;
+ if (!contains(arguments[j], item)) break;
}
- if (j === argsLength) result.push(item);
+ if (j === argsLength) result.push(item);
}
return result;
}
diff --git a/docs/modules/invert.html b/docs/modules/invert.html
index 369d6bd33..b4a042f34 100644
--- a/docs/modules/invert.html
+++ b/docs/modules/invert.html
@@ -849,7 +849,7 @@ invert.js
import keys from './keys.js';import keys from './keys.js';export default function invert(obj) {
+ export default function invert(obj) {
var result = {};
- var _keys = keys(obj);
- for (var i = 0, length = _keys.length; i < length; i++) {
+ var _keys = keys(obj);
+ for (var i = 0, length = _keys.length; i < length; i++) {
result[obj[_keys[i]]] = _keys[i];
}
return result;
diff --git a/docs/modules/invoke.html b/docs/modules/invoke.html
index f5980dfd3..a491bfb66 100644
--- a/docs/modules/invoke.html
+++ b/docs/modules/invoke.html
@@ -849,11 +849,11 @@ invoke.js
- import restArguments from './restArguments.js';
-import isFunction from './isFunction.js';
-import map from './map.js';
-import deepGet from './_deepGet.js';
-import toPath from './_toPath.js';
+ import restArguments from './restArguments.js';
+import isFunction from './isFunction.js';
+import map from './map.js';
+import deepGet from './_deepGet.js';
+import toPath from './_toPath.js';
@@ -868,25 +868,25 @@ invoke.js
- export default restArguments(function(obj, path, args) {
+ export default restArguments(function(obj, path, args) {
var contextPath, func;
- if (isFunction(path)) {
+ if (isFunction(path)) {
func = path;
} else {
- path = toPath(path);
- contextPath = path.slice(0, -1);
- path = path[path.length - 1];
+ path = toPath(path);
+ contextPath = path.slice(0, -1);
+ path = path[path.length - 1];
}
- return map(obj, function(context) {
+ return map(obj, function(context) {
var method = func;
if (!method) {
- if (contextPath && contextPath.length) {
- context = deepGet(context, contextPath);
+ if (contextPath && contextPath.length) {
+ context = deepGet(context, contextPath);
}
if (context == null) return void 0;
method = context[path];
}
- return method == null ? method : method.apply(context, args);
+ return method == null ? method : method.apply(context, args);
});
});
diff --git a/docs/modules/isArguments.html b/docs/modules/isArguments.html
index cb2384e96..4e611e4cd 100644
--- a/docs/modules/isArguments.html
+++ b/docs/modules/isArguments.html
@@ -849,10 +849,10 @@ isArguments.js
- import tagTester from './_tagTester.js';
-import has from './_has.js';
+ import tagTester from './_tagTester.js';
+import has from './_has.js';
-var isArguments = tagTester('Arguments');
+var isArguments = tagTester('Arguments');
@@ -868,10 +868,10 @@ isArguments.js
- (function() {
- if (!isArguments(arguments)) {
- isArguments = function(obj) {
- return has(obj, 'callee');
+ (function() {
+ if (!isArguments(arguments)) {
+ isArguments = function(obj) {
+ return has(obj, 'callee');
};
}
}());
diff --git a/docs/modules/isArray.html b/docs/modules/isArray.html
index feb331f18..7e7fbb1c0 100644
--- a/docs/modules/isArray.html
+++ b/docs/modules/isArray.html
@@ -849,8 +849,8 @@ isArray.js
- import { nativeIsArray } from './_setup.js';
-import tagTester from './_tagTester.js';
+ import { nativeIsArray } from './_setup.js';
+import tagTester from './_tagTester.js';
@@ -866,7 +866,7 @@ isArray.js
- export default nativeIsArray || tagTester('Array');
+ export default nativeIsArray || tagTester('Array');
diff --git a/docs/modules/isArrayBuffer.html b/docs/modules/isArrayBuffer.html
index 2dbd0378e..8b2b1d7dd 100644
--- a/docs/modules/isArrayBuffer.html
+++ b/docs/modules/isArrayBuffer.html
@@ -849,9 +849,9 @@ isArrayBuffer.js
- import tagTester from './_tagTester.js';
+ import tagTester from './_tagTester.js';
-export default tagTester('ArrayBuffer');
+export default tagTester('ArrayBuffer');
diff --git a/docs/modules/isBoolean.html b/docs/modules/isBoolean.html
index c7663eee4..709823d53 100644
--- a/docs/modules/isBoolean.html
+++ b/docs/modules/isBoolean.html
@@ -849,7 +849,7 @@ isBoolean.js
- import { toString } from './_setup.js';
+ import { toString } from './_setup.js';
@@ -864,8 +864,8 @@ isBoolean.js
export default function isBoolean(obj) {
- return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
+ export default function isBoolean(obj) {
+ return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
}
diff --git a/docs/modules/isDataView.html b/docs/modules/isDataView.html
index a5d2a1d63..155b9585c 100644
--- a/docs/modules/isDataView.html
+++ b/docs/modules/isDataView.html
@@ -849,12 +849,12 @@ isDataView.js
import tagTester from './_tagTester.js';
-import isFunction from './isFunction.js';
-import isArrayBuffer from './isArrayBuffer.js';
-import { hasStringTagBug } from './_stringTagBug.js';
+ import tagTester from './_tagTester.js';
+import isFunction from './isFunction.js';
+import isArrayBuffer from './isArrayBuffer.js';
+import { hasDataViewBug } from './_stringTagBug.js';
-var isDataView = tagTester('DataView');
+var isDataView = tagTester('DataView');In IE 10 - Edge 13, we need a different heuristic
-to determine whether an object is a DataView.
DataView.
+Also, in cases where the native DataView is
+overridden we canât rely on the tag itself.
function ie10IsDataView(obj) {
- return obj != null && isFunction(obj.getInt8) && isArrayBuffer(obj.buffer);
+ function alternateIsDataView(obj) {
+ return obj != null && isFunction(obj.getInt8) && isArrayBuffer(obj.buffer);
}
-export default (hasStringTagBug ? ie10IsDataView : isDataView);
+export default (hasDataViewBug ? alternateIsDataView : isDataView);import tagTester from './_tagTester.js';
+ import tagTester from './_tagTester.js';
-export default tagTester('Date');
+export default tagTester('Date');export default function isElement(obj) {
- return !!(obj && obj.nodeType === 1);
+ export default function isElement(obj) {
+ return !!(obj && obj.nodeType === 1);
}
diff --git a/docs/modules/isEmpty.html b/docs/modules/isEmpty.html
index 3b3f21b1a..bde06ab0d 100644
--- a/docs/modules/isEmpty.html
+++ b/docs/modules/isEmpty.html
@@ -849,11 +849,11 @@ isEmpty.js
import getLength from './_getLength.js';
-import isArray from './isArray.js';
-import isString from './isString.js';
-import isArguments from './isArguments.js';
-import keys from './keys.js';import getLength from './_getLength.js';
+import isArray from './isArray.js';
+import isString from './isString.js';
+import isArguments from './isArguments.js';
+import keys from './keys.js';export default function isEmpty(obj) {
+ export default function isEmpty(obj) {
if (obj == null) return true;
@@ -886,11 +886,11 @@ isEmpty.js
var length = getLength(obj);
- if (typeof length == 'number' && (
- isArray(obj) || isString(obj) || isArguments(obj)
- )) return length === 0;
- return getLength(keys(obj)) === 0;
+ var length = getLength(obj);
+ if (typeof length == 'number' && (
+ isArray(obj) || isString(obj) || isArguments(obj)
+ )) return length === 0;
+ return getLength(keys(obj)) === 0;
}
diff --git a/docs/modules/isEqual.html b/docs/modules/isEqual.html
index 609c746b0..5162cf0e6 100644
--- a/docs/modules/isEqual.html
+++ b/docs/modules/isEqual.html
@@ -849,16 +849,16 @@ isEqual.js
import _ from './underscore.js';
-import { toString, SymbolProto } from './_setup.js';
-import getByteLength from './_getByteLength.js';
-import isTypedArray from './isTypedArray.js';
-import isFunction from './isFunction.js';
-import { hasStringTagBug } from './_stringTagBug.js';
-import isDataView from './isDataView.js';
-import keys from './keys.js';
-import has from './_has.js';
-import toBufferView from './_toBufferView.js';import _ from './underscore.js';
+import { toString, SymbolProto } from './_setup.js';
+import getByteLength from './_getByteLength.js';
+import isTypedArray from './isTypedArray.js';
+import isFunction from './isFunction.js';
+import { hasDataViewBug } from './_stringTagBug.js';
+import isDataView from './isDataView.js';
+import keys from './keys.js';
+import has from './_has.js';
+import toBufferView from './_toBufferView.js';var tagDataView = '[object DataView]';var tagDataView = '[object DataView]';function eq(a, b, aStack, bStack) {function eq(a, b, aStack, bStack) { var type = typeof a;
- if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;
- return deepEq(a, b, aStack, bStack);
+ if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;
+ return deepEq(a, b, aStack, bStack);
}function deepEq(a, b, aStack, bStack) {function deepEq(a, b, aStack, bStack) { if (a instanceof _) a = a._wrapped;
- if (b instanceof _) b = b._wrapped; if (a instanceof _) a = a._wrapped;
+ if (b instanceof _) b = b._wrapped; var className = toString.call(a);
- if (className !== toString.call(b)) return false; var className = toString.call(a);
+ if (className !== toString.call(b)) return false; if (hasStringTagBug && className == '[object Object]' && isDataView(a)) {
- if (!isDataView(b)) return false;
+ if (hasDataViewBug && className == '[object Object]' && isDataView(a)) {
+ if (!isDataView(b)) return false;
className = tagDataView;
}
switch (className) {
@@ -1033,7 +1033,7 @@ isEqual.js
case '[object RegExp]': case '[object RegExp]': case '[object String]': case '[object String]': return '' + a === '' + b;
- case '[object Number]': return '' + a === '' + b;
+ case '[object Number]': return +a === 0 ? 1 / +a === 1 / b : +a === +b;
- case '[object Date]':
- case '[object Boolean]': return +a === +b;
- case '[object Symbol]':
- return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);
- case '[object ArrayBuffer]':
- case tagDataView: return deepEq(toBufferView(a), toBufferView(b), aStack, bStack);
+ return deepEq(toBufferView(a), toBufferView(b), aStack, bStack);
}
- var areArrays = className === '[object Array]';
- if (!areArrays && isTypedArray(a)) {
- var byteLength = getByteLength(a);
- if (byteLength !== getByteLength(b)) return false;
- if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true;
- areArrays = true;
+ var areArrays = className === '[object Array]';
+ if (!areArrays && isTypedArray(a)) {
+ var byteLength = getByteLength(a);
+ if (byteLength !== getByteLength(b)) return false;
+ if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true;
+ areArrays = true;
}
- if (!areArrays) {
- if (typeof a != 'object' || typeof b != 'object') return false;
+ if (!areArrays) {
+ if (typeof a != 'object' || typeof b != 'object') return false; var aCtor = a.constructor, bCtor = b.constructor;
- if (aCtor !== bCtor && !(isFunction(aCtor) && aCtor instanceof aCtor &&
- isFunction(bCtor) && bCtor instanceof bCtor)
- && ('constructor' in a && 'constructor' in b)) {
+ var aCtor = a.constructor, bCtor = b.constructor;
+ if (aCtor !== bCtor && !(isFunction(aCtor) && aCtor instanceof aCtor &&
+ isFunction(bCtor) && bCtor instanceof bCtor)
+ && ('constructor' in a && 'constructor' in b)) {
return false;
}
}
@@ -1199,7 +1199,7 @@ isEqual.js
aStack = aStack || [];
bStack = bStack || [];
- var length = aStack.length;
+ var length = aStack.length;
while (length--) {
@@ -1232,8 +1232,8 @@ isEqual.js
aStack.push(a);
- bStack.push(b); aStack.push(a);
+ bStack.push(b); length = a.length;
- if (length !== b.length) return false; length = a.length;
+ if (length !== b.length) return false; while (length--) {
- if (!eq(a[length], b[length], aStack, bStack)) return false;
+ if (!eq(a[length], b[length], aStack, bStack)) return false;
}
} else { var _keys = keys(a), key;
- length = _keys.length; var _keys = keys(a), key;
+ length = _keys.length; if (keys(b).length !== length) return false;
+ if (keys(b).length !== length) return false;
while (length--) {
@@ -1330,7 +1330,7 @@ isEqual.js
key = _keys[length];
- if (!(has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
+ if (!(has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
}
} aStack.pop();
- bStack.pop();
+ aStack.pop();
+ bStack.pop();
return true;
}
@@ -1365,8 +1365,8 @@ isEqual.js
export default function isEqual(a, b) {
- return eq(a, b);
+ export default function isEqual(a, b) {
+ return eq(a, b);
}
diff --git a/docs/modules/isError.html b/docs/modules/isError.html
index a958217c0..0992c66ed 100644
--- a/docs/modules/isError.html
+++ b/docs/modules/isError.html
@@ -849,9 +849,9 @@ isError.js
import tagTester from './_tagTester.js';
+ import tagTester from './_tagTester.js';
-export default tagTester('Error');
+export default tagTester('Error');import { _isFinite } from './_setup.js';
-import isSymbol from './isSymbol.js';import { _isFinite } from './_setup.js';
+import isSymbol from './isSymbol.js';export default function isFinite(obj) {
- return !isSymbol(obj) && _isFinite(obj) && !isNaN(parseFloat(obj));
+ export default function isFinite(obj) {
+ return !isSymbol(obj) && _isFinite(obj) && !isNaN(parseFloat(obj));
}
diff --git a/docs/modules/isFunction.html b/docs/modules/isFunction.html
index ada9e303d..c863bd889 100644
--- a/docs/modules/isFunction.html
+++ b/docs/modules/isFunction.html
@@ -849,10 +849,10 @@ isFunction.js
import tagTester from './_tagTester.js';
-import { root } from './_setup.js';
+ import tagTester from './_tagTester.js';
+import { root } from './_setup.js';
-var isFunction = tagTester('Function');
+var isFunction = tagTester('Function');var nodelist = root.document && root.document.childNodes;
-if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {
- isFunction = function(obj) {
- return typeof obj == 'function' || false;
+ var nodelist = root.document && root.document.childNodes;
+if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {
+ isFunction = function(obj) {
+ return typeof obj == 'function' || false;
};
}
diff --git a/docs/modules/isMap.html b/docs/modules/isMap.html
index 2708983e9..7e293efe0 100644
--- a/docs/modules/isMap.html
+++ b/docs/modules/isMap.html
@@ -849,11 +849,11 @@ isMap.js
- import tagTester from './_tagTester.js';
-import { isIE11 } from './_stringTagBug.js';
-import { ie11fingerprint, mapMethods } from './_methodFingerprint.js';
+ import tagTester from './_tagTester.js';
+import { isIE11 } from './_stringTagBug.js';
+import { ie11fingerprint, mapMethods } from './_methodFingerprint.js';
-export default isIE11 ? ie11fingerprint(mapMethods) : tagTester('Map');
+export default isIE11 ? ie11fingerprint(mapMethods) : tagTester('Map');
diff --git a/docs/modules/isMatch.html b/docs/modules/isMatch.html
index 11266a7f3..6bf69cb75 100644
--- a/docs/modules/isMatch.html
+++ b/docs/modules/isMatch.html
@@ -849,7 +849,7 @@ isMatch.js
- import keys from './keys.js';
+ import keys from './keys.js';
@@ -864,10 +864,10 @@ isMatch.js
export default function isMatch(object, attrs) {
- var _keys = keys(attrs), length = _keys.length;
+ export default function isMatch(object, attrs) {
+ var _keys = keys(attrs), length = _keys.length;
if (object == null) return !length;
- var obj = Object(object);
+ var obj = Object(object);
for (var i = 0; i < length; i++) {
var key = _keys[i];
if (attrs[key] !== obj[key] || !(key in obj)) return false;
diff --git a/docs/modules/isNaN.html b/docs/modules/isNaN.html
index 8c01b2673..e570a92f8 100644
--- a/docs/modules/isNaN.html
+++ b/docs/modules/isNaN.html
@@ -849,8 +849,8 @@ isNaN.js
- import { _isNaN } from './_setup.js';
-import isNumber from './isNumber.js';
+ import { _isNaN } from './_setup.js';
+import isNumber from './isNumber.js';
@@ -865,8 +865,8 @@ isNaN.js
- export default function isNaN(obj) {
- return isNumber(obj) && _isNaN(obj);
+ export default function isNaN(obj) {
+ return isNumber(obj) && _isNaN(obj);
}
diff --git a/docs/modules/isNull.html b/docs/modules/isNull.html
index 6ba9e41f2..2d1c016a1 100644
--- a/docs/modules/isNull.html
+++ b/docs/modules/isNull.html
@@ -850,7 +850,7 @@ isNull.js
- export default function isNull(obj) {
+ export default function isNull(obj) {
return obj === null;
}
diff --git a/docs/modules/isNumber.html b/docs/modules/isNumber.html
index 7242710a6..24fa0e427 100644
--- a/docs/modules/isNumber.html
+++ b/docs/modules/isNumber.html
@@ -849,9 +849,9 @@ isNumber.js
- import tagTester from './_tagTester.js';
+ import tagTester from './_tagTester.js';
-export default tagTester('Number');
+export default tagTester('Number');
diff --git a/docs/modules/isObject.html b/docs/modules/isObject.html
index f936d6059..81ee7f5e5 100644
--- a/docs/modules/isObject.html
+++ b/docs/modules/isObject.html
@@ -850,9 +850,9 @@ isObject.js
- export default function isObject(obj) {
+ export default function isObject(obj) {
var type = typeof obj;
- return type === 'function' || type === 'object' && !!obj;
+ return type === 'function' || (type === 'object' && !!obj);
}
diff --git a/docs/modules/isRegExp.html b/docs/modules/isRegExp.html
index 7ce366a0b..29887c06c 100644
--- a/docs/modules/isRegExp.html
+++ b/docs/modules/isRegExp.html
@@ -849,9 +849,9 @@ isRegExp.js
- import tagTester from './_tagTester.js';
+ import tagTester from './_tagTester.js';
-export default tagTester('RegExp');
+export default tagTester('RegExp');
diff --git a/docs/modules/isSet.html b/docs/modules/isSet.html
index 2b8667534..6949e7975 100644
--- a/docs/modules/isSet.html
+++ b/docs/modules/isSet.html
@@ -849,11 +849,11 @@ isSet.js
- import tagTester from './_tagTester.js';
-import { isIE11 } from './_stringTagBug.js';
-import { ie11fingerprint, setMethods } from './_methodFingerprint.js';
+ import tagTester from './_tagTester.js';
+import { isIE11 } from './_stringTagBug.js';
+import { ie11fingerprint, setMethods } from './_methodFingerprint.js';
-export default isIE11 ? ie11fingerprint(setMethods) : tagTester('Set');
+export default isIE11 ? ie11fingerprint(setMethods) : tagTester('Set');
diff --git a/docs/modules/isString.html b/docs/modules/isString.html
index e32a4c66a..aa06a654d 100644
--- a/docs/modules/isString.html
+++ b/docs/modules/isString.html
@@ -849,9 +849,9 @@ isString.js
- import tagTester from './_tagTester.js';
+ import tagTester from './_tagTester.js';
-export default tagTester('String');
+export default tagTester('String');
diff --git a/docs/modules/isSymbol.html b/docs/modules/isSymbol.html
index fdf26f428..43e2a6635 100644
--- a/docs/modules/isSymbol.html
+++ b/docs/modules/isSymbol.html
@@ -849,9 +849,9 @@ isSymbol.js
import tagTester from './_tagTester.js';
+ import tagTester from './_tagTester.js';
-export default tagTester('Symbol');
+export default tagTester('Symbol');import { supportsArrayBuffer, nativeIsView, toString } from './_setup.js';
-import isDataView from './isDataView.js';
-import constant from './constant.js';
-import isBufferLike from './_isBufferLike.js';import { supportsArrayBuffer, nativeIsView, toString } from './_setup.js';
+import isDataView from './isDataView.js';
+import constant from './constant.js';
+import isBufferLike from './_isBufferLike.js';var typedArrayPattern = /\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;
-function isTypedArray(obj) { return nativeIsView ? (nativeIsView(obj) && !isDataView(obj)) :
- isBufferLike(obj) && typedArrayPattern.test(toString.call(obj));
+ return nativeIsView ? (nativeIsView(obj) && !isDataView(obj)) :
+ isBufferLike(obj) && typedArrayPattern.test(toString.call(obj));
}
-export default supportsArrayBuffer ? isTypedArray : constant(false);
+export default supportsArrayBuffer ? isTypedArray : constant(false);export default function isUndefined(obj) {
+ export default function isUndefined(obj) {
return obj === void 0;
}
diff --git a/docs/modules/isWeakMap.html b/docs/modules/isWeakMap.html
index 56750ea01..d5dd3d8ef 100644
--- a/docs/modules/isWeakMap.html
+++ b/docs/modules/isWeakMap.html
@@ -849,11 +849,11 @@ isWeakMap.js
import tagTester from './_tagTester.js';
-import { isIE11 } from './_stringTagBug.js';
-import { ie11fingerprint, weakMapMethods } from './_methodFingerprint.js';
+ import tagTester from './_tagTester.js';
+import { isIE11 } from './_stringTagBug.js';
+import { ie11fingerprint, weakMapMethods } from './_methodFingerprint.js';
-export default isIE11 ? ie11fingerprint(weakMapMethods) : tagTester('WeakMap');
+export default isIE11 ? ie11fingerprint(weakMapMethods) : tagTester('WeakMap');import tagTester from './_tagTester.js';
+ import tagTester from './_tagTester.js';
-export default tagTester('WeakSet');
+export default tagTester('WeakSet');import _ from './underscore.js';
-import baseIteratee from './_baseIteratee.js';import _ from './underscore.js';
+import baseIteratee from './_baseIteratee.js';export default function iteratee(value, context) {
- return baseIteratee(value, context, Infinity);
+ export default function iteratee(value, context) {
+ return baseIteratee(value, context, Infinity);
}
-_.iteratee = iteratee;
+_.iteratee = iteratee;import isObject from './isObject.js';
-import { nativeKeys, hasEnumBug } from './_setup.js';
-import has from './_has.js';
-import collectNonEnumProps from './_collectNonEnumProps.js';import isObject from './isObject.js';
+import { nativeKeys, hasEnumBug } from './_setup.js';
+import has from './_has.js';
+import collectNonEnumProps from './_collectNonEnumProps.js';export default function keys(obj) {
- if (!isObject(obj)) return [];
- if (nativeKeys) return nativeKeys(obj);
+ export default function keys(obj) {
+ if (!isObject(obj)) return [];
+ if (nativeKeys) return nativeKeys(obj);
var keys = [];
- for (var key in obj) if (has(obj, key)) keys.push(key);
+ for (var key in obj) if (has(obj, key)) keys.push(key); if (hasEnumBug) collectNonEnumProps(obj, keys);
+ if (hasEnumBug) collectNonEnumProps(obj, keys);
return keys;
}
diff --git a/docs/modules/last.html b/docs/modules/last.html
index cd15223eb..6e9cf1a5d 100644
--- a/docs/modules/last.html
+++ b/docs/modules/last.html
@@ -849,7 +849,7 @@ last.js
import rest from './rest.js';import rest from './rest.js';export default function last(array, n, guard) {
- if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
- if (n == null || guard) return array[array.length - 1];
- return rest(array, Math.max(0, array.length - n));
+ export default function last(array, n, guard) {
+ if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
+ if (n == null || guard) return array[array.length - 1];
+ return rest(array, Math.max(0, array.length - n));
}
diff --git a/docs/modules/lastIndexOf.html b/docs/modules/lastIndexOf.html
index 764760688..0215aa0d6 100644
--- a/docs/modules/lastIndexOf.html
+++ b/docs/modules/lastIndexOf.html
@@ -849,8 +849,8 @@ lastIndexOf.js
import findLastIndex from './findLastIndex.js';
-import createIndexFinder from './_createIndexFinder.js';import findLastIndex from './findLastIndex.js';
+import createIndexFinder from './_createIndexFinder.js';export default createIndexFinder(-1, findLastIndex);export default createIndexFinder(-1, findLastIndex);import cb from './_cb.js';
-import isArrayLike from './_isArrayLike.js';
-import keys from './keys.js';import cb from './_cb.js';
+import isArrayLike from './_isArrayLike.js';
+import keys from './keys.js';export default function map(obj, iteratee, context) {
- iteratee = cb(iteratee, context);
- var _keys = !isArrayLike(obj) && keys(obj),
- length = (_keys || obj).length,
- results = Array(length);
+ export default function map(obj, iteratee, context) {
+ iteratee = cb(iteratee, context);
+ var _keys = !isArrayLike(obj) && keys(obj),
+ length = (_keys || obj).length,
+ results = Array(length);
for (var index = 0; index < length; index++) {
var currentKey = _keys ? _keys[index] : index;
- results[index] = iteratee(obj[currentKey], currentKey, obj);
+ results[index] = iteratee(obj[currentKey], currentKey, obj);
}
return results;
}
diff --git a/docs/modules/mapObject.html b/docs/modules/mapObject.html
index 37fb15856..1289eeceb 100644
--- a/docs/modules/mapObject.html
+++ b/docs/modules/mapObject.html
@@ -849,8 +849,8 @@ mapObject.js
import cb from './_cb.js';
-import keys from './keys.js';import cb from './_cb.js';
+import keys from './keys.js';export default function mapObject(obj, iteratee, context) {
- iteratee = cb(iteratee, context);
- var _keys = keys(obj),
- length = _keys.length,
+ export default function mapObject(obj, iteratee, context) {
+ iteratee = cb(iteratee, context);
+ var _keys = keys(obj),
+ length = _keys.length,
results = {};
for (var index = 0; index < length; index++) {
var currentKey = _keys[index];
- results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
+ results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
}
return results;
}
diff --git a/docs/modules/matcher.html b/docs/modules/matcher.html
index dfde6fe3a..b82929224 100644
--- a/docs/modules/matcher.html
+++ b/docs/modules/matcher.html
@@ -849,8 +849,8 @@ matcher.js
import extendOwn from './extendOwn.js';
-import isMatch from './isMatch.js';import extendOwn from './extendOwn.js';
+import isMatch from './isMatch.js';export default function matcher(attrs) {
- attrs = extendOwn({}, attrs);
- return function(obj) {
- return isMatch(obj, attrs);
+ export default function matcher(attrs) {
+ attrs = extendOwn({}, attrs);
+ return function(obj) {
+ return isMatch(obj, attrs);
};
}
diff --git a/docs/modules/max.html b/docs/modules/max.html
index 146723325..8af6bcc16 100644
--- a/docs/modules/max.html
+++ b/docs/modules/max.html
@@ -849,10 +849,10 @@ max.js
import isArrayLike from './_isArrayLike.js';
-import values from './values.js';
-import cb from './_cb.js';
-import each from './each.js';import isArrayLike from './_isArrayLike.js';
+import values from './values.js';
+import cb from './_cb.js';
+import each from './each.js';export default function max(obj, iteratee, context) {
- var result = -Infinity, lastComputed = -Infinity,
+ export default function max(obj, iteratee, context) {
+ var result = -Infinity, lastComputed = -Infinity,
value, computed;
- if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {
- obj = isArrayLike(obj) ? obj : values(obj);
- for (var i = 0, length = obj.length; i < length; i++) {
+ if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null)) {
+ obj = isArrayLike(obj) ? obj : values(obj);
+ for (var i = 0, length = obj.length; i < length; i++) {
value = obj[i];
if (value != null && value > result) {
result = value;
}
}
} else {
- iteratee = cb(iteratee, context);
- each(obj, function(v, index, list) {
- computed = iteratee(v, index, list);
- if (computed > lastComputed || computed === -Infinity && result === -Infinity) {
+ iteratee = cb(iteratee, context);
+ each(obj, function(v, index, list) {
+ computed = iteratee(v, index, list);
+ if (computed > lastComputed || (computed === -Infinity && result === -Infinity)) {
result = v;
lastComputed = computed;
}
diff --git a/docs/modules/memoize.html b/docs/modules/memoize.html
index dc0d62d4f..233511300 100644
--- a/docs/modules/memoize.html
+++ b/docs/modules/memoize.html
@@ -849,7 +849,7 @@ memoize.js
- import has from './_has.js';
+ import has from './_has.js';
@@ -864,14 +864,14 @@ memoize.js
- export default function memoize(func, hasher) {
- var memoize = function(key) {
- var cache = memoize.cache;
- var address = '' + (hasher ? hasher.apply(this, arguments) : key);
- if (!has(cache, address)) cache[address] = func.apply(this, arguments);
+ export default function memoize(func, hasher) {
+ var memoize = function(key) {
+ var cache = memoize.cache;
+ var address = '' + (hasher ? hasher.apply(this, arguments) : key);
+ if (!has(cache, address)) cache[address] = func.apply(this, arguments);
return cache[address];
};
- memoize.cache = {};
+ memoize.cache = {};
return memoize;
}
diff --git a/docs/modules/min.html b/docs/modules/min.html
index c43b4e5ee..8a389334f 100644
--- a/docs/modules/min.html
+++ b/docs/modules/min.html
@@ -849,10 +849,10 @@ min.js
- import isArrayLike from './_isArrayLike.js';
-import values from './values.js';
-import cb from './_cb.js';
-import each from './each.js';
+ import isArrayLike from './_isArrayLike.js';
+import values from './values.js';
+import cb from './_cb.js';
+import each from './each.js';
@@ -867,22 +867,22 @@ min.js
- export default function min(obj, iteratee, context) {
- var result = Infinity, lastComputed = Infinity,
+ export default function min(obj, iteratee, context) {
+ var result = Infinity, lastComputed = Infinity,
value, computed;
- if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {
- obj = isArrayLike(obj) ? obj : values(obj);
- for (var i = 0, length = obj.length; i < length; i++) {
+ if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null)) {
+ obj = isArrayLike(obj) ? obj : values(obj);
+ for (var i = 0, length = obj.length; i < length; i++) {
value = obj[i];
if (value != null && value < result) {
result = value;
}
}
} else {
- iteratee = cb(iteratee, context);
- each(obj, function(v, index, list) {
- computed = iteratee(v, index, list);
- if (computed < lastComputed || computed === Infinity && result === Infinity) {
+ iteratee = cb(iteratee, context);
+ each(obj, function(v, index, list) {
+ computed = iteratee(v, index, list);
+ if (computed < lastComputed || (computed === Infinity && result === Infinity)) {
result = v;
lastComputed = computed;
}
diff --git a/docs/modules/mixin.html b/docs/modules/mixin.html
index 9328cd775..047dcdb81 100644
--- a/docs/modules/mixin.html
+++ b/docs/modules/mixin.html
@@ -849,11 +849,11 @@ mixin.js
- import _ from './underscore.js';
-import each from './each.js';
-import functions from './functions.js';
-import { push } from './_setup.js';
-import chainResult from './_chainResult.js';
+ import _ from './underscore.js';
+import each from './each.js';
+import functions from './functions.js';
+import { push } from './_setup.js';
+import chainResult from './_chainResult.js';
@@ -868,13 +868,13 @@ mixin.js
- export default function mixin(obj) {
- each(functions(obj), function(name) {
+ export default function mixin(obj) {
+ each(functions(obj), function(name) {
var func = _[name] = obj[name];
- _.prototype[name] = function() {
- var args = [this._wrapped];
- push.apply(args, arguments);
- return chainResult(this, func.apply(_, args));
+ _.prototype[name] = function() {
+ var args = [this._wrapped];
+ push.apply(args, arguments);
+ return chainResult(this, func.apply(_, args));
};
});
return _;
diff --git a/docs/modules/negate.html b/docs/modules/negate.html
index 35e4c39b5..9bba2c883 100644
--- a/docs/modules/negate.html
+++ b/docs/modules/negate.html
@@ -850,9 +850,9 @@ negate.js
- export default function negate(predicate) {
- return function() {
- return !predicate.apply(this, arguments);
+ export default function negate(predicate) {
+ return function() {
+ return !predicate.apply(this, arguments);
};
}
diff --git a/docs/modules/noop.html b/docs/modules/noop.html
index 66e569d18..bee8fd763 100644
--- a/docs/modules/noop.html
+++ b/docs/modules/noop.html
@@ -850,7 +850,7 @@ noop.js
- export default function noop(){}
+ export default function noop(){}
diff --git a/docs/modules/now.html b/docs/modules/now.html
index 1e2ed2852..ebccce806 100644
--- a/docs/modules/now.html
+++ b/docs/modules/now.html
@@ -850,8 +850,8 @@ now.js
- export default Date.now || function() {
- return new Date().getTime();
+ export default Date.now || function() {
+ return new Date().getTime();
};
diff --git a/docs/modules/object.html b/docs/modules/object.html
index d7a79c7e2..358166346 100644
--- a/docs/modules/object.html
+++ b/docs/modules/object.html
@@ -849,7 +849,7 @@ object.js
- import getLength from './_getLength.js';
+ import getLength from './_getLength.js';
@@ -866,9 +866,9 @@ object.js
- export default function object(list, values) {
+ export default function object(list, values) {
var result = {};
- for (var i = 0, length = getLength(list); i < length; i++) {
+ for (var i = 0, length = getLength(list); i < length; i++) {
if (values) {
result[list[i]] = values[i];
} else {
diff --git a/docs/modules/omit.html b/docs/modules/omit.html
index a14c94ac5..2f4a8f82e 100644
--- a/docs/modules/omit.html
+++ b/docs/modules/omit.html
@@ -849,13 +849,13 @@ omit.js
- import restArguments from './restArguments.js';
-import isFunction from './isFunction.js';
-import negate from './negate.js';
-import map from './map.js';
-import flatten from './_flatten.js';
-import contains from './contains.js';
-import pick from './pick.js';
+ import restArguments from './restArguments.js';
+import isFunction from './isFunction.js';
+import negate from './negate.js';
+import map from './map.js';
+import flatten from './_flatten.js';
+import contains from './contains.js';
+import pick from './pick.js';
@@ -870,18 +870,18 @@ omit.js
- export default restArguments(function(obj, keys) {
+ export default restArguments(function(obj, keys) {
var iteratee = keys[0], context;
- if (isFunction(iteratee)) {
- iteratee = negate(iteratee);
- if (keys.length > 1) context = keys[1];
+ if (isFunction(iteratee)) {
+ iteratee = negate(iteratee);
+ if (keys.length > 1) context = keys[1];
} else {
- keys = map(flatten(keys, false, false), String);
- iteratee = function(value, key) {
- return !contains(keys, key);
+ keys = map(flatten(keys, false, false), String);
+ iteratee = function(value, key) {
+ return !contains(keys, key);
};
}
- return pick(obj, iteratee, context);
+ return pick(obj, iteratee, context);
});
diff --git a/docs/modules/once.html b/docs/modules/once.html
index 4ca502355..9d0f3c74e 100644
--- a/docs/modules/once.html
+++ b/docs/modules/once.html
@@ -849,8 +849,8 @@ once.js
- import partial from './partial.js';
-import before from './before.js';
+ import partial from './partial.js';
+import before from './before.js';
@@ -866,7 +866,7 @@ once.js
- export default partial(before, 2);
+ export default partial(before, 2);
diff --git a/docs/modules/pairs.html b/docs/modules/pairs.html
index 1329dd33e..504b81964 100644
--- a/docs/modules/pairs.html
+++ b/docs/modules/pairs.html
@@ -849,7 +849,7 @@ pairs.js
- import keys from './keys.js';
+ import keys from './keys.js';
@@ -865,10 +865,10 @@ pairs.js
- export default function pairs(obj) {
- var _keys = keys(obj);
- var length = _keys.length;
- var pairs = Array(length);
+ export default function pairs(obj) {
+ var _keys = keys(obj);
+ var length = _keys.length;
+ var pairs = Array(length);
for (var i = 0; i < length; i++) {
pairs[i] = [_keys[i], obj[_keys[i]]];
}
diff --git a/docs/modules/partial.html b/docs/modules/partial.html
index 0150b1dbb..63ae4e387 100644
--- a/docs/modules/partial.html
+++ b/docs/modules/partial.html
@@ -849,9 +849,9 @@ partial.js
- import restArguments from './restArguments.js';
-import executeBound from './_executeBound.js';
-import _ from './underscore.js';
+ import restArguments from './restArguments.js';
+import executeBound from './_executeBound.js';
+import _ from './underscore.js';
@@ -869,21 +869,21 @@ partial.js
- var partial = restArguments(function(func, boundArgs) {
- var placeholder = partial.placeholder;
- var bound = function() {
- var position = 0, length = boundArgs.length;
- var args = Array(length);
+ var partial = restArguments(function(func, boundArgs) {
+ var placeholder = partial.placeholder;
+ var bound = function() {
+ var position = 0, length = boundArgs.length;
+ var args = Array(length);
for (var i = 0; i < length; i++) {
- args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];
+ args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];
}
- while (position < arguments.length) args.push(arguments[position++]);
- return executeBound(func, bound, this, this, args);
+ while (position < arguments.length) args.push(arguments[position++]);
+ return executeBound(func, bound, this, this, args);
};
return bound;
});
-partial.placeholder = _;
+partial.placeholder = _;
export default partial;
diff --git a/docs/modules/partition.html b/docs/modules/partition.html
index 1719d3550..1025aceb9 100644
--- a/docs/modules/partition.html
+++ b/docs/modules/partition.html
@@ -849,7 +849,7 @@ partition.js
- import group from './_group.js';
+ import group from './_group.js';
@@ -865,8 +865,8 @@ partition.js
- export default group(function(result, value, pass) {
- result[pass ? 0 : 1].push(value);
+ export default group(function(result, value, pass) {
+ result[pass ? 0 : 1].push(value);
}, true);
diff --git a/docs/modules/pick.html b/docs/modules/pick.html
index 507164e67..be43d803d 100644
--- a/docs/modules/pick.html
+++ b/docs/modules/pick.html
@@ -849,12 +849,12 @@ pick.js
- import restArguments from './restArguments.js';
-import isFunction from './isFunction.js';
-import optimizeCb from './_optimizeCb.js';
-import allKeys from './allKeys.js';
-import keyInObj from './_keyInObj.js';
-import flatten from './_flatten.js';
+ import restArguments from './restArguments.js';
+import isFunction from './isFunction.js';
+import optimizeCb from './_optimizeCb.js';
+import allKeys from './allKeys.js';
+import keyInObj from './_keyInObj.js';
+import flatten from './_flatten.js';
@@ -869,21 +869,21 @@ pick.js
- export default restArguments(function(obj, keys) {
+ export default restArguments(function(obj, keys) {
var result = {}, iteratee = keys[0];
if (obj == null) return result;
- if (isFunction(iteratee)) {
- if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]);
- keys = allKeys(obj);
+ if (isFunction(iteratee)) {
+ if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]);
+ keys = allKeys(obj);
} else {
iteratee = keyInObj;
- keys = flatten(keys, false, false);
- obj = Object(obj);
+ keys = flatten(keys, false, false);
+ obj = Object(obj);
}
- for (var i = 0, length = keys.length; i < length; i++) {
+ for (var i = 0, length = keys.length; i < length; i++) {
var key = keys[i];
var value = obj[key];
- if (iteratee(value, key, obj)) result[key] = value;
+ if (iteratee(value, key, obj)) result[key] = value;
}
return result;
});
diff --git a/docs/modules/pluck.html b/docs/modules/pluck.html
index 211a56a44..1ad51ecf0 100644
--- a/docs/modules/pluck.html
+++ b/docs/modules/pluck.html
@@ -849,8 +849,8 @@ pluck.js
- import map from './map.js';
-import property from './property.js';
+ import map from './map.js';
+import property from './property.js';
@@ -865,8 +865,8 @@ pluck.js
- export default function pluck(obj, key) {
- return map(obj, property(key));
+ export default function pluck(obj, key) {
+ return map(obj, property(key));
}
diff --git a/docs/modules/property.html b/docs/modules/property.html
index fde0bbfd6..87df085a6 100644
--- a/docs/modules/property.html
+++ b/docs/modules/property.html
@@ -849,8 +849,8 @@ property.js
- import deepGet from './_deepGet.js';
-import toPath from './_toPath.js';
+ import deepGet from './_deepGet.js';
+import toPath from './_toPath.js';
@@ -866,10 +866,10 @@ property.js
- export default function property(path) {
- path = toPath(path);
- return function(obj) {
- return deepGet(obj, path);
+ export default function property(path) {
+ path = toPath(path);
+ return function(obj) {
+ return deepGet(obj, path);
};
}
diff --git a/docs/modules/propertyOf.html b/docs/modules/propertyOf.html
index f53cf094a..74f33c215 100644
--- a/docs/modules/propertyOf.html
+++ b/docs/modules/propertyOf.html
@@ -849,8 +849,8 @@ propertyOf.js
- import noop from './noop.js';
-import get from './get.js';
+ import noop from './noop.js';
+import get from './get.js';
@@ -865,10 +865,10 @@ propertyOf.js
- export default function propertyOf(obj) {
+ export default function propertyOf(obj) {
if (obj == null) return noop;
- return function(path) {
- return get(obj, path);
+ return function(path) {
+ return get(obj, path);
};
}
diff --git a/docs/modules/random.html b/docs/modules/random.html
index 03b9dfb81..21a6c1f26 100644
--- a/docs/modules/random.html
+++ b/docs/modules/random.html
@@ -850,12 +850,12 @@ random.js
- export default function random(min, max) {
+ export default function random(min, max) {
if (max == null) {
max = min;
min = 0;
}
- return min + Math.floor(Math.random() * (max - min + 1));
+ return min + Math.floor(Math.random() * (max - min + 1));
}
diff --git a/docs/modules/range.html b/docs/modules/range.html
index 46b712bf9..3593821cc 100644
--- a/docs/modules/range.html
+++ b/docs/modules/range.html
@@ -852,17 +852,17 @@ range.js
- export default function range(start, stop, step) {
+ export default function range(start, stop, step) {
if (stop == null) {
stop = start || 0;
start = 0;
}
if (!step) {
- step = stop < start ? -1 : 1;
+ step = stop < start ? -1 : 1;
}
- var length = Math.max(Math.ceil((stop - start) / step), 0);
- var range = Array(length);
+ var length = Math.max(Math.ceil((stop - start) / step), 0);
+ var range = Array(length);
for (var idx = 0; idx < length; idx++, start += step) {
range[idx] = start;
diff --git a/docs/modules/reduce.html b/docs/modules/reduce.html
index 872e179e0..09a2bf989 100644
--- a/docs/modules/reduce.html
+++ b/docs/modules/reduce.html
@@ -849,7 +849,7 @@ reduce.js
- import createReduce from './_createReduce.js';
+ import createReduce from './_createReduce.js';
@@ -865,7 +865,7 @@ reduce.js
- export default createReduce(1);
+ export default createReduce(1);
diff --git a/docs/modules/reduceRight.html b/docs/modules/reduceRight.html
index 88af28093..66a2e3c73 100644
--- a/docs/modules/reduceRight.html
+++ b/docs/modules/reduceRight.html
@@ -849,7 +849,7 @@ reduceRight.js
- import createReduce from './_createReduce.js';
+ import createReduce from './_createReduce.js';
@@ -864,7 +864,7 @@ reduceRight.js
- export default createReduce(-1);
+ export default createReduce(-1);
diff --git a/docs/modules/reject.html b/docs/modules/reject.html
index 4ebf3c88a..d866c216a 100644
--- a/docs/modules/reject.html
+++ b/docs/modules/reject.html
@@ -849,9 +849,9 @@ reject.js
- import filter from './filter.js';
-import negate from './negate.js';
-import cb from './_cb.js';
+ import filter from './filter.js';
+import negate from './negate.js';
+import cb from './_cb.js';
@@ -866,8 +866,8 @@ reject.js
- export default function reject(obj, predicate, context) {
- return filter(obj, negate(cb(predicate)), context);
+ export default function reject(obj, predicate, context) {
+ return filter(obj, negate(cb(predicate)), context);
}
diff --git a/docs/modules/rest.html b/docs/modules/rest.html
index f162ac8a9..3b7204fb7 100644
--- a/docs/modules/rest.html
+++ b/docs/modules/rest.html
@@ -849,7 +849,7 @@ rest.js
- import { slice } from './_setup.js';
+ import { slice } from './_setup.js';
@@ -866,8 +866,8 @@ rest.js
- export default function rest(array, n, guard) {
- return slice.call(array, n == null || guard ? 1 : n);
+ export default function rest(array, n, guard) {
+ return slice.call(array, n == null || guard ? 1 : n);
}
diff --git a/docs/modules/restArguments.html b/docs/modules/restArguments.html
index ea7d11ca4..6bd77bd30 100644
--- a/docs/modules/restArguments.html
+++ b/docs/modules/restArguments.html
@@ -854,26 +854,26 @@ restArguments.js
- export default function restArguments(func, startIndex) {
- startIndex = startIndex == null ? func.length - 1 : +startIndex;
- return function() {
- var length = Math.max(arguments.length - startIndex, 0),
- rest = Array(length),
+ export default function restArguments(func, startIndex) {
+ startIndex = startIndex == null ? func.length - 1 : +startIndex;
+ return function() {
+ var length = Math.max(arguments.length - startIndex, 0),
+ rest = Array(length),
index = 0;
for (; index < length; index++) {
- rest[index] = arguments[index + startIndex];
+ rest[index] = arguments[index + startIndex];
}
switch (startIndex) {
- case 0: return func.call(this, rest);
- case 1: return func.call(this, arguments[0], rest);
- case 2: return func.call(this, arguments[0], arguments[1], rest);
+ case 0: return func.call(this, rest);
+ case 1: return func.call(this, arguments[0], rest);
+ case 2: return func.call(this, arguments[0], arguments[1], rest);
}
- var args = Array(startIndex + 1);
+ var args = Array(startIndex + 1);
for (index = 0; index < startIndex; index++) {
- args[index] = arguments[index];
+ args[index] = arguments[index];
}
args[startIndex] = rest;
- return func.apply(this, args);
+ return func.apply(this, args);
};
}
diff --git a/docs/modules/result.html b/docs/modules/result.html
index b855c7f94..ef03ff122 100644
--- a/docs/modules/result.html
+++ b/docs/modules/result.html
@@ -849,8 +849,8 @@ result.js
- import isFunction from './isFunction.js';
-import toPath from './_toPath.js';
+ import isFunction from './isFunction.js';
+import toPath from './_toPath.js';
@@ -867,19 +867,19 @@ result.js
- export default function result(obj, path, fallback) {
- path = toPath(path);
- var length = path.length;
+ export default function result(obj, path, fallback) {
+ path = toPath(path);
+ var length = path.length;
if (!length) {
- return isFunction(fallback) ? fallback.call(obj) : fallback;
+ return isFunction(fallback) ? fallback.call(obj) : fallback;
}
for (var i = 0; i < length; i++) {
var prop = obj == null ? void 0 : obj[path[i]];
if (prop === void 0) {
prop = fallback;
- i = length; // Ensure we don't continue iterating.
+ i = length; // Ensure we don't continue iterating.
}
- obj = isFunction(prop) ? prop.call(obj) : prop;
+ obj = isFunction(prop) ? prop.call(obj) : prop;
}
return obj;
}
diff --git a/docs/modules/sample.html b/docs/modules/sample.html
index af6993859..4a4c505a1 100644
--- a/docs/modules/sample.html
+++ b/docs/modules/sample.html
@@ -849,11 +849,11 @@ sample.js
- import isArrayLike from './_isArrayLike.js';
-import values from './values.js';
-import getLength from './_getLength.js';
-import random from './random.js';
-import toArray from './toArray.js';
+ import isArrayLike from './_isArrayLike.js';
+import values from './values.js';
+import getLength from './_getLength.js';
+import random from './random.js';
+import toArray from './toArray.js';
@@ -871,22 +871,22 @@ sample.js
- export default function sample(obj, n, guard) {
+ export default function sample(obj, n, guard) {
if (n == null || guard) {
- if (!isArrayLike(obj)) obj = values(obj);
- return obj[random(obj.length - 1)];
+ if (!isArrayLike(obj)) obj = values(obj);
+ return obj[random(obj.length - 1)];
}
- var sample = toArray(obj);
- var length = getLength(sample);
- n = Math.max(Math.min(n, length), 0);
- var last = length - 1;
- for (var index = 0; index < n; index++) {
- var rand = random(index, last);
+ var sample = toArray(obj);
+ var length = getLength(sample);
+ n = Math.max(Math.min(n, length), 0);
+ var last = length - 1;
+ for (var index = 0; index < n; index++) {
+ var rand = random(index, last);
var temp = sample[index];
sample[index] = sample[rand];
sample[rand] = temp;
}
- return sample.slice(0, n);
+ return sample.slice(0, n);
}
diff --git a/docs/modules/shuffle.html b/docs/modules/shuffle.html
index 6b0d1c41a..3ba3d1e7b 100644
--- a/docs/modules/shuffle.html
+++ b/docs/modules/shuffle.html
@@ -849,7 +849,7 @@ shuffle.js
- import sample from './sample.js';
+ import sample from './sample.js';
@@ -864,8 +864,8 @@ shuffle.js
- export default function shuffle(obj) {
- return sample(obj, Infinity);
+ export default function shuffle(obj) {
+ return sample(obj, Infinity);
}
diff --git a/docs/modules/size.html b/docs/modules/size.html
index 9e84c0817..aac60174c 100644
--- a/docs/modules/size.html
+++ b/docs/modules/size.html
@@ -849,8 +849,8 @@ size.js
- import isArrayLike from './_isArrayLike.js';
-import keys from './keys.js';
+ import isArrayLike from './_isArrayLike.js';
+import keys from './keys.js';
@@ -865,9 +865,9 @@ size.js
- export default function size(obj) {
+ export default function size(obj) {
if (obj == null) return 0;
- return isArrayLike(obj) ? obj.length : keys(obj).length;
+ return isArrayLike(obj) ? obj.length : keys(obj).length;
}
diff --git a/docs/modules/some.html b/docs/modules/some.html
index 698972cc0..8a9eacf9b 100644
--- a/docs/modules/some.html
+++ b/docs/modules/some.html
@@ -849,9 +849,9 @@ some.js
- import cb from './_cb.js';
-import isArrayLike from './_isArrayLike.js';
-import keys from './keys.js';
+ import cb from './_cb.js';
+import isArrayLike from './_isArrayLike.js';
+import keys from './keys.js';
@@ -866,13 +866,13 @@ some.js
- export default function some(obj, predicate, context) {
- predicate = cb(predicate, context);
- var _keys = !isArrayLike(obj) && keys(obj),
- length = (_keys || obj).length;
+ export default function some(obj, predicate, context) {
+ predicate = cb(predicate, context);
+ var _keys = !isArrayLike(obj) && keys(obj),
+ length = (_keys || obj).length;
for (var index = 0; index < length; index++) {
var currentKey = _keys ? _keys[index] : index;
- if (predicate(obj[currentKey], currentKey, obj)) return true;
+ if (predicate(obj[currentKey], currentKey, obj)) return true;
}
return false;
}
diff --git a/docs/modules/sortBy.html b/docs/modules/sortBy.html
index ec1c7501a..3c015c2c8 100644
--- a/docs/modules/sortBy.html
+++ b/docs/modules/sortBy.html
@@ -849,9 +849,9 @@ sortBy.js
- import cb from './_cb.js';
-import pluck from './pluck.js';
-import map from './map.js';
+ import cb from './_cb.js';
+import pluck from './pluck.js';
+import map from './map.js';
@@ -866,24 +866,24 @@ sortBy.js
- export default function sortBy(obj, iteratee, context) {
+ export default function sortBy(obj, iteratee, context) {
var index = 0;
- iteratee = cb(iteratee, context);
- return pluck(map(obj, function(value, key, list) {
+ iteratee = cb(iteratee, context);
+ return pluck(map(obj, function(value, key, list) {
return {
value: value,
index: index++,
- criteria: iteratee(value, key, list)
+ criteria: iteratee(value, key, list)
};
- }).sort(function(left, right) {
- var a = left.criteria;
- var b = right.criteria;
+ }).sort(function(left, right) {
+ var a = left.criteria;
+ var b = right.criteria;
if (a !== b) {
if (a > b || a === void 0) return 1;
- if (a < b || b === void 0) return -1;
+ if (a < b || b === void 0) return -1;
}
- return left.index - right.index;
- }), 'value');
+ return left.index - right.index;
+ }), 'value');
}
diff --git a/docs/modules/sortedIndex.html b/docs/modules/sortedIndex.html
index f0f9b45ca..cb3901aa2 100644
--- a/docs/modules/sortedIndex.html
+++ b/docs/modules/sortedIndex.html
@@ -849,8 +849,8 @@ sortedIndex.js
- import cb from './_cb.js';
-import getLength from './_getLength.js';
+ import cb from './_cb.js';
+import getLength from './_getLength.js';
@@ -866,13 +866,13 @@ sortedIndex.js
- export default function sortedIndex(array, obj, iteratee, context) {
- iteratee = cb(iteratee, context, 1);
- var value = iteratee(obj);
- var low = 0, high = getLength(array);
- while (low < high) {
- var mid = Math.floor((low + high) / 2);
- if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;
+ export default function sortedIndex(array, obj, iteratee, context) {
+ iteratee = cb(iteratee, context, 1);
+ var value = iteratee(obj);
+ var low = 0, high = getLength(array);
+ while (low < high) {
+ var mid = Math.floor((low + high) / 2);
+ if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;
}
return low;
}
diff --git a/docs/modules/tap.html b/docs/modules/tap.html
index b426b2530..be4111cb8 100644
--- a/docs/modules/tap.html
+++ b/docs/modules/tap.html
@@ -852,8 +852,8 @@ tap.js
- export default function tap(obj, interceptor) {
- interceptor(obj);
+ export default function tap(obj, interceptor) {
+ interceptor(obj);
return obj;
}
diff --git a/docs/modules/template.html b/docs/modules/template.html
index 88c1daaca..55ee7ea2a 100644
--- a/docs/modules/template.html
+++ b/docs/modules/template.html
@@ -849,9 +849,9 @@ template.js
- import defaults from './defaults.js';
-import _ from './underscore.js';
-import './templateSettings.js';
+ import defaults from './defaults.js';
+import _ from './underscore.js';
+import './templateSettings.js';
@@ -885,18 +885,18 @@ template.js
var escapes = {
- "'": "'",
- '\\': '\\',
- '\r': 'r',
- '\n': 'n',
- '\u2028': 'u2028',
- '\u2029': 'u2029'
+ "'": "'",
+ '\\': '\\',
+ '\r': 'r',
+ '\n': 'n',
+ '\u2028': 'u2028',
+ '\u2029': 'u2029'
};
-var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g;
+var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g;
-function escapeChar(match) {
- return '\\' + escapes[match];
+function escapeChar(match) {
+ return '\\' + escapes[match];
}
@@ -934,9 +934,9 @@ template.js
- export default function template(text, settings, oldSettings) {
+ export default function template(text, settings, oldSettings) {
if (!settings && oldSettings) settings = oldSettings;
- settings = defaults({}, settings, _.templateSettings);
+ settings = defaults({}, settings, _.templateSettings);
@@ -951,11 +951,11 @@ template.js
- var matcher = RegExp([
- (settings.escape || noMatch).source,
- (settings.interpolate || noMatch).source,
- (settings.evaluate || noMatch).source
- ].join('|') + '|$', 'g');
+ var matcher = RegExp([
+ (settings.escape || noMatch).source,
+ (settings.interpolate || noMatch).source,
+ (settings.evaluate || noMatch).source
+ ].join('|') + '|$', 'g');
@@ -971,17 +971,17 @@ template.js
var index = 0;
- var source = "__p+='";
- text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
- source += text.slice(index, offset).replace(escapeRegExp, escapeChar);
- index = offset + match.length;
+ var source = "__p+='";
+ text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
+ source += text.slice(index, offset).replace(escapeRegExp, escapeChar);
+ index = offset + match.length;
if (escape) {
- source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
+ source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
} else if (interpolate) {
- source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
+ source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
} else if (evaluate) {
- source += "';\n" + evaluate + "\n__p+='";
+ source += "';\n" + evaluate + "\n__p+='";
}
@@ -999,9 +999,9 @@ template.js
return match;
});
- source += "';\n";
+ source += "';\n";
- var argument = settings.variable;
+ var argument = settings.variable;
if (argument) {
@@ -1017,8 +1017,8 @@ template.js
- if (!bareIdentifier.test(argument)) throw new Error(
- 'variable is not a bare identifier: ' + argument
+ if (!bareIdentifier.test(argument)) throw new Error(
+ 'variable is not a bare identifier: ' + argument
);
} else {
@@ -1035,24 +1035,24 @@ template.js
- source = 'with(obj||{}){\n' + source + '}\n';
- argument = 'obj';
+ source = 'with(obj||{}){\n' + source + '}\n';
+ argument = 'obj';
}
- source = "var __t,__p='',__j=Array.prototype.join," +
- "print=function(){__p+=__j.call(arguments,'');};\n" +
- source + 'return __p;\n';
+ source = "var __t,__p='',__j=Array.prototype.join," +
+ "print=function(){__p+=__j.call(arguments,'');};\n" +
+ source + 'return __p;\n';
var render;
try {
- render = new Function(argument, '_', source);
+ render = new Function(argument, '_', source);
} catch (e) {
- e.source = source;
+ e.source = source;
throw e;
}
- var template = function(data) {
- return render.call(this, data, _);
+ var template = function(data) {
+ return render.call(this, data, _);
};
@@ -1068,7 +1068,7 @@ template.js
- template.source = 'function(' + argument + '){\n' + source + '}';
+ template.source = 'function(' + argument + '){\n' + source + '}';
return template;
}
diff --git a/docs/modules/templateSettings.html b/docs/modules/templateSettings.html
index 836975b96..32995ce46 100644
--- a/docs/modules/templateSettings.html
+++ b/docs/modules/templateSettings.html
@@ -849,7 +849,7 @@ templateSettings.js
- import _ from './underscore.js';
+ import _ from './underscore.js';
@@ -865,10 +865,10 @@ templateSettings.js
- export default _.templateSettings = {
+ export default _.templateSettings = {
evaluate: /<%([\s\S]+?)%>/g,
- interpolate: /<%=([\s\S]+?)%>/g,
- escape: /<%-([\s\S]+?)%>/g
+ interpolate: /<%=([\s\S]+?)%>/g,
+ escape: /<%-([\s\S]+?)%>/g
};
diff --git a/docs/modules/throttle.html b/docs/modules/throttle.html
index 253573a86..f5c20ed6a 100644
--- a/docs/modules/throttle.html
+++ b/docs/modules/throttle.html
@@ -849,7 +849,7 @@ throttle.js
- import now from './now.js';
+ import now from './now.js';
@@ -868,40 +868,40 @@ throttle.js
- export default function throttle(func, wait, options) {
+ export default function throttle(func, wait, options) {
var timeout, context, args, result;
var previous = 0;
if (!options) options = {};
- var later = function() {
- previous = options.leading === false ? 0 : now();
+ var later = function() {
+ previous = options.leading === false ? 0 : now();
timeout = null;
- result = func.apply(context, args);
+ result = func.apply(context, args);
if (!timeout) context = args = null;
};
- var throttled = function() {
- var _now = now();
- if (!previous && options.leading === false) previous = _now;
+ var throttled = function() {
+ var _now = now();
+ if (!previous && options.leading === false) previous = _now;
var remaining = wait - (_now - previous);
- context = this;
- args = arguments;
+ context = this;
+ args = arguments;
if (remaining <= 0 || remaining > wait) {
if (timeout) {
- clearTimeout(timeout);
+ clearTimeout(timeout);
timeout = null;
}
previous = _now;
- result = func.apply(context, args);
+ result = func.apply(context, args);
if (!timeout) context = args = null;
- } else if (!timeout && options.trailing !== false) {
- timeout = setTimeout(later, remaining);
+ } else if (!timeout && options.trailing !== false) {
+ timeout = setTimeout(later, remaining);
}
- return result;
+ return result;
};
- throttled.cancel = function() {
- clearTimeout(timeout);
+ throttled.cancel = function() {
+ clearTimeout(timeout);
previous = 0;
timeout = context = args = null;
};
diff --git a/docs/modules/times.html b/docs/modules/times.html
index 5a761b531..9d45af770 100644
--- a/docs/modules/times.html
+++ b/docs/modules/times.html
@@ -849,7 +849,7 @@ times.js
- import optimizeCb from './_optimizeCb.js';
+ import optimizeCb from './_optimizeCb.js';
@@ -864,10 +864,10 @@ times.js
- export default function times(n, iteratee, context) {
- var accum = Array(Math.max(0, n));
- iteratee = optimizeCb(iteratee, context, 1);
- for (var i = 0; i < n; i++) accum[i] = iteratee(i);
+ export default function times(n, iteratee, context) {
+ var accum = Array(Math.max(0, n));
+ iteratee = optimizeCb(iteratee, context, 1);
+ for (var i = 0; i < n; i++) accum[i] = iteratee(i);
return accum;
}
diff --git a/docs/modules/toArray.html b/docs/modules/toArray.html
index b945c8387..8c75db421 100644
--- a/docs/modules/toArray.html
+++ b/docs/modules/toArray.html
@@ -849,13 +849,13 @@ toArray.js
- import isArray from './isArray.js';
-import { slice } from './_setup.js';
-import isString from './isString.js';
-import isArrayLike from './_isArrayLike.js';
-import map from './map.js';
-import identity from './identity.js';
-import values from './values.js';
+ import isArray from './isArray.js';
+import { slice } from './_setup.js';
+import isString from './isString.js';
+import isArrayLike from './_isArrayLike.js';
+import map from './map.js';
+import identity from './identity.js';
+import values from './values.js';
@@ -871,10 +871,10 @@ toArray.js
var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;
-export default function toArray(obj) {
+export default function toArray(obj) {
if (!obj) return [];
- if (isArray(obj)) return slice.call(obj);
- if (isString(obj)) {
+ if (isArray(obj)) return slice.call(obj);
+ if (isString(obj)) {
@@ -889,10 +889,10 @@ toArray.js
- return obj.match(reStrSymbol);
+ return obj.match(reStrSymbol);
}
- if (isArrayLike(obj)) return map(obj, identity);
- return values(obj);
+ if (isArrayLike(obj)) return map(obj, identity);
+ return values(obj);
}
diff --git a/docs/modules/toPath.html b/docs/modules/toPath.html
index 1ddf3a2bf..fadbeae8f 100644
--- a/docs/modules/toPath.html
+++ b/docs/modules/toPath.html
@@ -849,8 +849,8 @@ toPath.js
- import _ from './underscore.js';
-import isArray from './isArray.js';
+ import _ from './underscore.js';
+import isArray from './isArray.js';
@@ -866,10 +866,10 @@ toPath.js
- export default function toPath(path) {
- return isArray(path) ? path : [path];
+ export default function toPath(path) {
+ return isArray(path) ? path : [path];
}
-_.toPath = toPath;
+_.toPath = toPath;
diff --git a/docs/modules/underscore-array-methods.html b/docs/modules/underscore-array-methods.html
index 3edb72e37..dd6b31c51 100644
--- a/docs/modules/underscore-array-methods.html
+++ b/docs/modules/underscore-array-methods.html
@@ -849,10 +849,10 @@ underscore-array-methods.js
- import _ from './underscore.js';
-import each from './each.js';
-import { ArrayProto } from './_setup.js';
-import chainResult from './_chainResult.js';
+ import _ from './underscore.js';
+import each from './each.js';
+import { ArrayProto } from './_setup.js';
+import chainResult from './_chainResult.js';
@@ -867,17 +867,17 @@ underscore-array-methods.js
- each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
- var method = ArrayProto[name];
- _.prototype[name] = function() {
- var obj = this._wrapped;
+ each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
+ var method = ArrayProto[name];
+ _.prototype[name] = function() {
+ var obj = this._wrapped;
if (obj != null) {
- method.apply(obj, arguments);
- if ((name === 'shift' || name === 'splice') && obj.length === 0) {
+ method.apply(obj, arguments);
+ if ((name === 'shift' || name === 'splice') && obj.length === 0) {
delete obj[0];
}
}
- return chainResult(this, obj);
+ return chainResult(this, obj);
};
});
@@ -894,12 +894,12 @@ underscore-array-methods.js
- each(['concat', 'join', 'slice'], function(name) {
- var method = ArrayProto[name];
- _.prototype[name] = function() {
- var obj = this._wrapped;
- if (obj != null) obj = method.apply(obj, arguments);
- return chainResult(this, obj);
+ each(['concat', 'join', 'slice'], function(name) {
+ var method = ArrayProto[name];
+ _.prototype[name] = function() {
+ var obj = this._wrapped;
+ if (obj != null) obj = method.apply(obj, arguments);
+ return chainResult(this, obj);
};
});
diff --git a/docs/modules/underscore.html b/docs/modules/underscore.html
index 9a8dab22a..b05b2a1b1 100644
--- a/docs/modules/underscore.html
+++ b/docs/modules/underscore.html
@@ -849,7 +849,7 @@ underscore.js
- import { VERSION } from './_setup.js';
+ import { VERSION } from './_setup.js';
@@ -866,13 +866,13 @@ underscore.js
- export default function _(obj) {
+ export default function _(obj) {
if (obj instanceof _) return obj;
- if (!(this instanceof _)) return new _(obj);
- this._wrapped = obj;
+ if (!(this instanceof _)) return new _(obj);
+ this._wrapped = obj;
}
-_.VERSION = VERSION;
+_.VERSION = VERSION;
@@ -887,8 +887,8 @@ underscore.js
- _.prototype.value = function() {
- return this._wrapped;
+ _.prototype.value = function() {
+ return this._wrapped;
};
@@ -905,10 +905,10 @@ underscore.js
- _.prototype.valueOf = _.prototype.toJSON = _.prototype.value;
+ _.prototype.valueOf = _.prototype.toJSON = _.prototype.value;
-_.prototype.toString = function() {
- return String(this._wrapped);
+_.prototype.toString = function() {
+ return String(this._wrapped);
};
diff --git a/docs/modules/unescape.html b/docs/modules/unescape.html
index c256bf7ec..f5a4e48e1 100644
--- a/docs/modules/unescape.html
+++ b/docs/modules/unescape.html
@@ -849,8 +849,8 @@ unescape.js
- import createEscaper from './_createEscaper.js';
-import unescapeMap from './_unescapeMap.js';
+ import createEscaper from './_createEscaper.js';
+import unescapeMap from './_unescapeMap.js';
@@ -865,7 +865,7 @@ unescape.js
- export default createEscaper(unescapeMap);
+ export default createEscaper(unescapeMap);
diff --git a/docs/modules/union.html b/docs/modules/union.html
index 027a0f92d..7c22b6a87 100644
--- a/docs/modules/union.html
+++ b/docs/modules/union.html
@@ -849,9 +849,9 @@ union.js
- import restArguments from './restArguments.js';
-import uniq from './uniq.js';
-import flatten from './_flatten.js';
+ import restArguments from './restArguments.js';
+import uniq from './uniq.js';
+import flatten from './_flatten.js';
@@ -867,8 +867,8 @@ union.js
- export default restArguments(function(arrays) {
- return uniq(flatten(arrays, true, true));
+ export default restArguments(function(arrays) {
+ return uniq(flatten(arrays, true, true));
});
diff --git a/docs/modules/uniq.html b/docs/modules/uniq.html
index 486cefeb8..f86a24d3f 100644
--- a/docs/modules/uniq.html
+++ b/docs/modules/uniq.html
@@ -849,10 +849,10 @@ uniq.js
- import isBoolean from './isBoolean.js';
-import cb from './_cb.js';
-import getLength from './_getLength.js';
-import contains from './contains.js';
+ import isBoolean from './isBoolean.js';
+import cb from './_cb.js';
+import getLength from './_getLength.js';
+import contains from './contains.js';
@@ -871,28 +871,28 @@ uniq.js
- export default function uniq(array, isSorted, iteratee, context) {
- if (!isBoolean(isSorted)) {
+ export default function uniq(array, isSorted, iteratee, context) {
+ if (!isBoolean(isSorted)) {
context = iteratee;
iteratee = isSorted;
isSorted = false;
}
- if (iteratee != null) iteratee = cb(iteratee, context);
+ if (iteratee != null) iteratee = cb(iteratee, context);
var result = [];
var seen = [];
- for (var i = 0, length = getLength(array); i < length; i++) {
+ for (var i = 0, length = getLength(array); i < length; i++) {
var value = array[i],
- computed = iteratee ? iteratee(value, i, array) : value;
+ computed = iteratee ? iteratee(value, i, array) : value;
if (isSorted && !iteratee) {
- if (!i || seen !== computed) result.push(value);
+ if (!i || seen !== computed) result.push(value);
seen = computed;
} else if (iteratee) {
- if (!contains(seen, computed)) {
- seen.push(computed);
- result.push(value);
+ if (!contains(seen, computed)) {
+ seen.push(computed);
+ result.push(value);
}
- } else if (!contains(result, value)) {
- result.push(value);
+ } else if (!contains(result, value)) {
+ result.push(value);
}
}
return result;
diff --git a/docs/modules/uniqueId.html b/docs/modules/uniqueId.html
index 3c4a5fae4..72315295c 100644
--- a/docs/modules/uniqueId.html
+++ b/docs/modules/uniqueId.html
@@ -852,8 +852,8 @@ uniqueId.js
var idCounter = 0;
-export default function uniqueId(prefix) {
- var id = ++idCounter + '';
+export default function uniqueId(prefix) {
+ var id = ++idCounter + '';
return prefix ? prefix + id : id;
}
diff --git a/docs/modules/unzip.html b/docs/modules/unzip.html
index cf2327977..3a13a193d 100644
--- a/docs/modules/unzip.html
+++ b/docs/modules/unzip.html
@@ -849,9 +849,9 @@ unzip.js
- import max from './max.js';
-import getLength from './_getLength.js';
-import pluck from './pluck.js';
+ import max from './max.js';
+import getLength from './_getLength.js';
+import pluck from './pluck.js';
@@ -867,12 +867,12 @@ unzip.js
- export default function unzip(array) {
- var length = array && max(array, getLength).length || 0;
- var result = Array(length);
+ export default function unzip(array) {
+ var length = (array && max(array, getLength).length) || 0;
+ var result = Array(length);
for (var index = 0; index < length; index++) {
- result[index] = pluck(array, index);
+ result[index] = pluck(array, index);
}
return result;
}
diff --git a/docs/modules/values.html b/docs/modules/values.html
index c660b80ca..80538c2a5 100644
--- a/docs/modules/values.html
+++ b/docs/modules/values.html
@@ -849,7 +849,7 @@ values.js
- import keys from './keys.js';
+ import keys from './keys.js';
@@ -864,10 +864,10 @@ values.js
- export default function values(obj) {
- var _keys = keys(obj);
- var length = _keys.length;
- var values = Array(length);
+ export default function values(obj) {
+ var _keys = keys(obj);
+ var length = _keys.length;
+ var values = Array(length);
for (var i = 0; i < length; i++) {
values[i] = obj[_keys[i]];
}
diff --git a/docs/modules/where.html b/docs/modules/where.html
index 24f46d83c..58a2ca6e0 100644
--- a/docs/modules/where.html
+++ b/docs/modules/where.html
@@ -849,8 +849,8 @@ where.js
- import filter from './filter.js';
-import matcher from './matcher.js';
+ import filter from './filter.js';
+import matcher from './matcher.js';
@@ -866,8 +866,8 @@ where.js
- export default function where(obj, attrs) {
- return filter(obj, matcher(attrs));
+ export default function where(obj, attrs) {
+ return filter(obj, matcher(attrs));
}
diff --git a/docs/modules/without.html b/docs/modules/without.html
index 3630a1411..8d35307fa 100644
--- a/docs/modules/without.html
+++ b/docs/modules/without.html
@@ -849,8 +849,8 @@ without.js
- import restArguments from './restArguments.js';
-import difference from './difference.js';
+ import restArguments from './restArguments.js';
+import difference from './difference.js';
@@ -865,8 +865,8 @@ without.js
- export default restArguments(function(array, otherArrays) {
- return difference(array, otherArrays);
+ export default restArguments(function(array, otherArrays) {
+ return difference(array, otherArrays);
});
diff --git a/docs/modules/wrap.html b/docs/modules/wrap.html
index c45078a38..a9419eba8 100644
--- a/docs/modules/wrap.html
+++ b/docs/modules/wrap.html
@@ -849,7 +849,7 @@ wrap.js
- import partial from './partial.js';
+ import partial from './partial.js';
@@ -866,8 +866,8 @@ wrap.js
- export default function wrap(func, wrapper) {
- return partial(wrapper, func);
+ export default function wrap(func, wrapper) {
+ return partial(wrapper, func);
}
diff --git a/docs/modules/zip.html b/docs/modules/zip.html
index ab0c16d0c..dfcb6003e 100644
--- a/docs/modules/zip.html
+++ b/docs/modules/zip.html
@@ -849,8 +849,8 @@ zip.js
- import restArguments from './restArguments.js';
-import unzip from './unzip.js';
+ import restArguments from './restArguments.js';
+import unzip from './unzip.js';
@@ -866,7 +866,7 @@ zip.js
- export default restArguments(unzip);
+ export default restArguments(unzip);
diff --git a/docs/underscore-esm.html b/docs/underscore-esm.html
index 525c9c997..a783b4513 100644
--- a/docs/underscore-esm.html
+++ b/docs/underscore-esm.html
@@ -27,10 +27,12 @@ underscore-esm.js
- Underscore.js 1.13.2
+ Underscore.js 1.13.7
https://underscorejs.org
-(c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors
-Underscore may be freely distributed under the MIT license.
+(c) 2009-2024 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors
+Underscore may be freely distributed under the MIT license.
+
+
@@ -46,7 +48,7 @@ underscore-esm.js
- var VERSION = '1.13.2';
+ var VERSION = '1.13.7';
@@ -63,9 +65,9 @@ underscore-esm.js
- var root = typeof self == 'object' && self.self === self && self ||
- typeof global == 'object' && global.global === global && global ||
- Function('return this')() ||
+ var root = (typeof self == 'object' && self.self === self && self) ||
+ (typeof global == 'object' && global.global === global && global) ||
+ Function('return this')() ||
{};
@@ -81,8 +83,8 @@ underscore-esm.js
- var ArrayProto = Array.prototype, ObjProto = Object.prototype;
-var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;
+ var ArrayProto = Array.prototype, ObjProto = Object.prototype;
+var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;
@@ -97,10 +99,10 @@ underscore-esm.js
- var push = ArrayProto.push,
- slice = ArrayProto.slice,
- toString = ObjProto.toString,
- hasOwnProperty = ObjProto.hasOwnProperty;
+ var push = ArrayProto.push,
+ slice = ArrayProto.slice,
+ toString = ObjProto.toString,
+ hasOwnProperty = ObjProto.hasOwnProperty;
@@ -115,8 +117,8 @@ underscore-esm.js
- var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined',
- supportsDataView = typeof DataView !== 'undefined';
+ var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined',
+ supportsDataView = typeof DataView !== 'undefined';
@@ -132,10 +134,10 @@ underscore-esm.js
- var nativeIsArray = Array.isArray,
- nativeKeys = Object.keys,
- nativeCreate = Object.create,
- nativeIsView = supportsArrayBuffer && ArrayBuffer.isView;
+ var nativeIsArray = Array.isArray,
+ nativeKeys = Object.keys,
+ nativeCreate = Object.create,
+ nativeIsView = supportsArrayBuffer && ArrayBuffer.isView;
@@ -166,9 +168,9 @@ underscore-esm.js
- var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');
-var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',
- 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
+ var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');
+var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',
+ 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
@@ -183,7 +185,7 @@ underscore-esm.js
- var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;
+ var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;
@@ -202,26 +204,26 @@ underscore-esm.js
- function restArguments(func, startIndex) {
- startIndex = startIndex == null ? func.length - 1 : +startIndex;
- return function() {
- var length = Math.max(arguments.length - startIndex, 0),
- rest = Array(length),
+ function restArguments(func, startIndex) {
+ startIndex = startIndex == null ? func.length - 1 : +startIndex;
+ return function() {
+ var length = Math.max(arguments.length - startIndex, 0),
+ rest = Array(length),
index = 0;
for (; index < length; index++) {
- rest[index] = arguments[index + startIndex];
+ rest[index] = arguments[index + startIndex];
}
switch (startIndex) {
- case 0: return func.call(this, rest);
- case 1: return func.call(this, arguments[0], rest);
- case 2: return func.call(this, arguments[0], arguments[1], rest);
+ case 0: return func.call(this, rest);
+ case 1: return func.call(this, arguments[0], rest);
+ case 2: return func.call(this, arguments[0], arguments[1], rest);
}
- var args = Array(startIndex + 1);
+ var args = Array(startIndex + 1);
for (index = 0; index < startIndex; index++) {
- args[index] = arguments[index];
+ args[index] = arguments[index];
}
args[startIndex] = rest;
- return func.apply(this, args);
+ return func.apply(this, args);
};
}
@@ -238,9 +240,9 @@ underscore-esm.js
- function isObject(obj) {
+ function isObject(obj) {
var type = typeof obj;
- return type === 'function' || type === 'object' && !!obj;
+ return type === 'function' || (type === 'object' && !!obj);
}
@@ -256,7 +258,7 @@ underscore-esm.js
- function isNull(obj) {
+ function isNull(obj) {
return obj === null;
}
@@ -273,7 +275,7 @@ underscore-esm.js
- function isUndefined(obj) {
+ function isUndefined(obj) {
return obj === void 0;
}
@@ -290,8 +292,8 @@ underscore-esm.js
- function isBoolean(obj) {
- return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
+ function isBoolean(obj) {
+ return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
}
@@ -307,8 +309,8 @@ underscore-esm.js
- function isElement(obj) {
- return !!(obj && obj.nodeType === 1);
+ function isElement(obj) {
+ return !!(obj && obj.nodeType === 1);
}
@@ -324,28 +326,28 @@ underscore-esm.js
- function tagTester(name) {
- var tag = '[object ' + name + ']';
- return function(obj) {
- return toString.call(obj) === tag;
+ function tagTester(name) {
+ var tag = '[object ' + name + ']';
+ return function(obj) {
+ return toString.call(obj) === tag;
};
}
-var isString = tagTester('String');
+var isString = tagTester('String');
-var isNumber = tagTester('Number');
+var isNumber = tagTester('Number');
-var isDate = tagTester('Date');
+var isDate = tagTester('Date');
-var isRegExp = tagTester('RegExp');
+var isRegExp = tagTester('RegExp');
-var isError = tagTester('Error');
+var isError = tagTester('Error');
-var isSymbol = tagTester('Symbol');
+var isSymbol = tagTester('Symbol');
-var isArrayBuffer = tagTester('ArrayBuffer');
+var isArrayBuffer = tagTester('ArrayBuffer');
-var isFunction = tagTester('Function');
+var isFunction = tagTester('Function');
@@ -361,16 +363,16 @@ underscore-esm.js
- var nodelist = root.document && root.document.childNodes;
-if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {
- isFunction = function(obj) {
- return typeof obj == 'function' || false;
+ var nodelist = root.document && root.document.childNodes;
+if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {
+ isFunction = function(obj) {
+ return typeof obj == 'function' || false;
};
}
var isFunction$1 = isFunction;
-var hasObjectTag = tagTester('Object');
+var hasObjectTag = tagTester('Object');
@@ -383,16 +385,19 @@ underscore-esm.js
In IE 10 - Edge 13, DataView has string tag '[object Object]'.
In IE 11, the most common among them, this problem also applies to
-Map, WeakMap and Set.
+Map, WeakMap and Set.
+Also, there are cases where an application can override the native
+DataView object, in cases like that we canât use the constructor
+safely and should just rely on alternate DataView checks
- var hasStringTagBug = (
- supportsDataView && hasObjectTag(new DataView(new ArrayBuffer(8)))
+ var hasDataViewBug = (
+ supportsDataView && (!/\[native code\]/.test(String(DataView)) || hasObjectTag(new DataView(new ArrayBuffer(8))))
),
- isIE11 = (typeof Map !== 'undefined' && hasObjectTag(new Map));
+ isIE11 = (typeof Map !== 'undefined' && hasObjectTag(new Map));
-var isDataView = tagTester('DataView');
+var isDataView = tagTester('DataView');
@@ -404,15 +409,17 @@ underscore-esm.js
¶
In IE 10 - Edge 13, we need a different heuristic
-to determine whether an object is a DataView.
+to determine whether an object is a DataView.
+Also, in cases where the native DataView is
+overridden we canât rely on the tag itself.
- function ie10IsDataView(obj) {
- return obj != null && isFunction$1(obj.getInt8) && isArrayBuffer(obj.buffer);
+ function alternateIsDataView(obj) {
+ return obj != null && isFunction$1(obj.getInt8) && isArrayBuffer(obj.buffer);
}
-var isDataView$1 = (hasStringTagBug ? ie10IsDataView : isDataView);
+var isDataView$1 = (hasDataViewBug ? alternateIsDataView : isDataView);
@@ -428,7 +435,7 @@ underscore-esm.js
- var isArray = nativeIsArray || tagTester('Array');
+ var isArray = nativeIsArray || tagTester('Array');
@@ -443,11 +450,11 @@ underscore-esm.js
function has$1(obj, key) {
- return obj != null && hasOwnProperty.call(obj, key);
+ function has$1(obj, key) {
+ return obj != null && hasOwnProperty.call(obj, key);
}
-var isArguments = tagTester('Arguments');
+var isArguments = tagTester('Arguments');(function() {
- if (!isArguments(arguments)) {
- isArguments = function(obj) {
- return has$1(obj, 'callee');
+ (function() {
+ if (!isArguments(arguments)) {
+ isArguments = function(obj) {
+ return has$1(obj, 'callee');
};
}
}());
@@ -486,8 +493,8 @@ underscore-esm.js
- function isFinite$1(obj) {
- return !isSymbol(obj) && _isFinite(obj) && !isNaN(parseFloat(obj));
+ function isFinite$1(obj) {
+ return !isSymbol(obj) && _isFinite(obj) && !isNaN(parseFloat(obj));
}
@@ -503,8 +510,8 @@ underscore-esm.js
- function isNaN$1(obj) {
- return isNumber(obj) && _isNaN(obj);
+ function isNaN$1(obj) {
+ return isNumber(obj) && _isNaN(obj);
}
@@ -520,8 +527,8 @@ underscore-esm.js
- function constant(value) {
- return function() {
+ function constant(value) {
+ return function() {
return value;
};
}
@@ -539,10 +546,10 @@ underscore-esm.js
- function createSizePropertyCheck(getSizeProperty) {
- return function(collection) {
- var sizeProperty = getSizeProperty(collection);
- return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;
+ function createSizePropertyCheck(getSizeProperty) {
+ return function(collection) {
+ var sizeProperty = getSizeProperty(collection);
+ return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;
}
}
@@ -559,8 +566,8 @@ underscore-esm.js
- function shallowProperty(key) {
- return function(obj) {
+ function shallowProperty(key) {
+ return function(obj) {
return obj == null ? void 0 : obj[key];
};
}
@@ -578,7 +585,7 @@ underscore-esm.js
- var getByteLength = shallowProperty('byteLength');
+ var getByteLength = shallowProperty('byteLength');
@@ -594,7 +601,7 @@ underscore-esm.js
- var isBufferLike = createSizePropertyCheck(getByteLength);
+ var isBufferLike = createSizePropertyCheck(getByteLength);
@@ -610,7 +617,7 @@ underscore-esm.js
var typedArrayPattern = /\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;
-function isTypedArray(obj) {
+function isTypedArray(obj) {
@@ -626,11 +633,11 @@ underscore-esm.js
- return nativeIsView ? (nativeIsView(obj) && !isDataView$1(obj)) :
- isBufferLike(obj) && typedArrayPattern.test(toString.call(obj));
+ return nativeIsView ? (nativeIsView(obj) && !isDataView$1(obj)) :
+ isBufferLike(obj) && typedArrayPattern.test(toString.call(obj));
}
-var isTypedArray$1 = supportsArrayBuffer ? isTypedArray : constant(false);
+var isTypedArray$1 = supportsArrayBuffer ? isTypedArray : constant(false);
@@ -645,7 +652,7 @@ underscore-esm.js
- var getLength = shallowProperty('length');
+ var getLength = shallowProperty('length');
@@ -663,14 +670,14 @@ underscore-esm.js
function emulatedSet(keys) {
+ function emulatedSet(keys) {
var hash = {};
- for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true;
+ for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true;
return {
- contains: function(key) { return hash[key] === true; },
- push: function(key) {
+ contains: function(key) { return hash[key] === true; },
+ push: function(key) {
hash[key] = true;
- return keys.push(key);
+ return keys.push(key);
}
};
}
@@ -690,11 +697,11 @@ underscore-esm.js
function collectNonEnumProps(obj, keys) {
- keys = emulatedSet(keys);
- var nonEnumIdx = nonEnumerableProps.length;
- var constructor = obj.constructor;
- var proto = isFunction$1(constructor) && constructor.prototype || ObjProto;function collectNonEnumProps(obj, keys) {
+ keys = emulatedSet(keys);
+ var nonEnumIdx = nonEnumerableProps.length;
+ var constructor = obj.constructor;
+ var proto = (isFunction$1(constructor) && constructor.prototype) || ObjProto; var prop = 'constructor';
- if (has$1(obj, prop) && !keys.contains(prop)) keys.push(prop);
+ var prop = 'constructor';
+ if (has$1(obj, prop) && !keys.contains(prop)) keys.push(prop);
while (nonEnumIdx--) {
prop = nonEnumerableProps[nonEnumIdx];
- if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) {
- keys.push(prop);
+ if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) {
+ keys.push(prop);
}
}
}
@@ -734,11 +741,11 @@ underscore-esm.js
function keys(obj) {
- if (!isObject(obj)) return [];
- if (nativeKeys) return nativeKeys(obj);
+ function keys(obj) {
+ if (!isObject(obj)) return [];
+ if (nativeKeys) return nativeKeys(obj);
var keys = [];
- for (var key in obj) if (has$1(obj, key)) keys.push(key);
+ for (var key in obj) if (has$1(obj, key)) keys.push(key); if (hasEnumBug) collectNonEnumProps(obj, keys);
+ if (hasEnumBug) collectNonEnumProps(obj, keys);
return keys;
}
@@ -771,7 +778,7 @@ underscore-esm.js
function isEmpty(obj) {
+ function isEmpty(obj) {
if (obj == null) return true;
@@ -788,11 +795,11 @@ underscore-esm.js
var length = getLength(obj);
- if (typeof length == 'number' && (
- isArray(obj) || isString(obj) || isArguments$1(obj)
- )) return length === 0;
- return getLength(keys(obj)) === 0;
+ var length = getLength(obj);
+ if (typeof length == 'number' && (
+ isArray(obj) || isString(obj) || isArguments$1(obj)
+ )) return length === 0;
+ return getLength(keys(obj)) === 0;
}
@@ -808,10 +815,10 @@ underscore-esm.js
function isMatch(object, attrs) {
- var _keys = keys(attrs), length = _keys.length;
+ function isMatch(object, attrs) {
+ var _keys = keys(attrs), length = _keys.length;
if (object == null) return !length;
- var obj = Object(object);
+ var obj = Object(object);
for (var i = 0; i < length; i++) {
var key = _keys[i];
if (attrs[key] !== obj[key] || !(key in obj)) return false;
@@ -834,13 +841,13 @@ underscore-esm.js
- function _$1(obj) {
+ function _$1(obj) {
if (obj instanceof _$1) return obj;
- if (!(this instanceof _$1)) return new _$1(obj);
- this._wrapped = obj;
+ if (!(this instanceof _$1)) return new _$1(obj);
+ this._wrapped = obj;
}
-_$1.VERSION = VERSION;
+_$1.VERSION = VERSION;
@@ -855,8 +862,8 @@ underscore-esm.js
- _$1.prototype.value = function() {
- return this._wrapped;
+ _$1.prototype.value = function() {
+ return this._wrapped;
};
@@ -873,10 +880,10 @@ underscore-esm.js
- _$1.prototype.valueOf = _$1.prototype.toJSON = _$1.prototype.value;
+ _$1.prototype.valueOf = _$1.prototype.toJSON = _$1.prototype.value;
-_$1.prototype.toString = function() {
- return String(this._wrapped);
+_$1.prototype.toString = function() {
+ return String(this._wrapped);
};
@@ -893,11 +900,11 @@ underscore-esm.js
- function toBufferView(bufferSource) {
- return new Uint8Array(
- bufferSource.buffer || bufferSource,
- bufferSource.byteOffset || 0,
- getByteLength(bufferSource)
+ function toBufferView(bufferSource) {
+ return new Uint8Array(
+ bufferSource.buffer || bufferSource,
+ bufferSource.byteOffset || 0,
+ getByteLength(bufferSource)
);
}
@@ -914,7 +921,7 @@ underscore-esm.js
- var tagDataView = '[object DataView]';
+ var tagDataView = '[object DataView]';
@@ -929,7 +936,7 @@ underscore-esm.js
- function eq(a, b, aStack, bStack) {
+ function eq(a, b, aStack, bStack) {
@@ -991,8 +998,8 @@ underscore-esm.js
var type = typeof a;
- if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;
- return deepEq(a, b, aStack, bStack);
+ if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;
+ return deepEq(a, b, aStack, bStack);
}
@@ -1008,7 +1015,7 @@ underscore-esm.js
- function deepEq(a, b, aStack, bStack) {
+ function deepEq(a, b, aStack, bStack) {
@@ -1023,8 +1030,8 @@ underscore-esm.js
if (a instanceof _$1) a = a._wrapped;
- if (b instanceof _$1) b = b._wrapped; if (a instanceof _$1) a = a._wrapped;
+ if (b instanceof _$1) b = b._wrapped; var className = toString.call(a);
- if (className !== toString.call(b)) return false; var className = toString.call(a);
+ if (className !== toString.call(b)) return false; if (hasStringTagBug && className == '[object Object]' && isDataView$1(a)) {
- if (!isDataView$1(b)) return false;
+ if (hasDataViewBug && className == '[object Object]' && isDataView$1(a)) {
+ if (!isDataView$1(b)) return false;
className = tagDataView;
}
switch (className) {
@@ -1074,7 +1081,7 @@ underscore-esm.js
case '[object RegExp]': case '[object RegExp]': case '[object String]': case '[object String]': return '' + a === '' + b;
- case '[object Number]': return '' + a === '' + b;
+ case '[object Number]': return +a === 0 ? 1 / +a === 1 / b : +a === +b;
- case '[object Date]':
- case '[object Boolean]': return +a === +b;
- case '[object Symbol]':
- return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);
- case '[object ArrayBuffer]':
- case tagDataView: return deepEq(toBufferView(a), toBufferView(b), aStack, bStack);
+ return deepEq(toBufferView(a), toBufferView(b), aStack, bStack);
}
- var areArrays = className === '[object Array]';
- if (!areArrays && isTypedArray$1(a)) {
- var byteLength = getByteLength(a);
- if (byteLength !== getByteLength(b)) return false;
- if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true;
- areArrays = true;
+ var areArrays = className === '[object Array]';
+ if (!areArrays && isTypedArray$1(a)) {
+ var byteLength = getByteLength(a);
+ if (byteLength !== getByteLength(b)) return false;
+ if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true;
+ areArrays = true;
}
- if (!areArrays) {
- if (typeof a != 'object' || typeof b != 'object') return false;
+ if (!areArrays) {
+ if (typeof a != 'object' || typeof b != 'object') return false; var aCtor = a.constructor, bCtor = b.constructor;
- if (aCtor !== bCtor && !(isFunction$1(aCtor) && aCtor instanceof aCtor &&
- isFunction$1(bCtor) && bCtor instanceof bCtor)
- && ('constructor' in a && 'constructor' in b)) {
+ var aCtor = a.constructor, bCtor = b.constructor;
+ if (aCtor !== bCtor && !(isFunction$1(aCtor) && aCtor instanceof aCtor &&
+ isFunction$1(bCtor) && bCtor instanceof bCtor)
+ && ('constructor' in a && 'constructor' in b)) {
return false;
}
}
@@ -1240,7 +1247,7 @@ underscore-esm.js
aStack = aStack || [];
bStack = bStack || [];
- var length = aStack.length;
+ var length = aStack.length;
while (length--) {
@@ -1273,8 +1280,8 @@ underscore-esm.js
aStack.push(a);
- bStack.push(b); aStack.push(a);
+ bStack.push(b); length = a.length;
- if (length !== b.length) return false; length = a.length;
+ if (length !== b.length) return false; while (length--) {
- if (!eq(a[length], b[length], aStack, bStack)) return false;
+ if (!eq(a[length], b[length], aStack, bStack)) return false;
}
} else { var _keys = keys(a), key;
- length = _keys.length; var _keys = keys(a), key;
+ length = _keys.length; if (keys(b).length !== length) return false;
+ if (keys(b).length !== length) return false;
while (length--) {
@@ -1371,7 +1378,7 @@ underscore-esm.js
key = _keys[length];
- if (!(has$1(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
+ if (!(has$1(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
}
} aStack.pop();
- bStack.pop();
+ aStack.pop();
+ bStack.pop();
return true;
}
@@ -1406,8 +1413,8 @@ underscore-esm.js
function isEqual(a, b) {
- return eq(a, b);
+ function isEqual(a, b) {
+ return eq(a, b);
}
@@ -1423,10 +1430,10 @@ underscore-esm.js
function allKeys(obj) {
- if (!isObject(obj)) return [];
+ function allKeys(obj) {
+ if (!isObject(obj)) return [];
var keys = [];
- for (var key in obj) keys.push(key);
+ for (var key in obj) keys.push(key); if (hasEnumBug) collectNonEnumProps(obj, keys);
+ if (hasEnumBug) collectNonEnumProps(obj, keys);
return keys;
}
@@ -1461,9 +1468,9 @@ underscore-esm.js
function ie11fingerprint(methods) {
- var length = getLength(methods);
- return function(obj) {
+ function ie11fingerprint(methods) {
+ var length = getLength(methods);
+ return function(obj) {
if (obj == null) return false;
@@ -1479,10 +1486,10 @@ underscore-esm.js
var keys = allKeys(obj);
- if (getLength(keys)) return false;
- for (var i = 0; i < length; i++) {
- if (!isFunction$1(obj[methods[i]])) return false;
+ var keys = allKeys(obj);
+ if (getLength(keys)) return false;
+ for (var i = 0; i < length; i++) {
+ if (!isFunction$1(obj[methods[i]])) return false;
}
@@ -1500,7 +1507,7 @@ underscore-esm.js
return methods !== weakMapMethods || !isFunction$1(obj[forEachName]);
+ return methods !== weakMapMethods || !isFunction$1(obj[forEachName]);
};
}
@@ -1518,10 +1525,10 @@ underscore-esm.js
var forEachName = 'forEach',
- hasName = 'has',
- commonInit = ['clear', 'delete'],
- mapTail = ['get', hasName, 'set'];var forEachName = 'forEach',
+ hasName = 'has',
+ commonInit = ['clear', 'delete'],
+ mapTail = ['get', hasName, 'set'];var mapMethods = commonInit.concat(forEachName, mapTail),
- weakMapMethods = commonInit.concat(mapTail),
- setMethods = ['add'].concat(commonInit, forEachName, hasName);
+ var mapMethods = commonInit.concat(forEachName, mapTail),
+ weakMapMethods = commonInit.concat(mapTail),
+ setMethods = ['add'].concat(commonInit, forEachName, hasName);
-var isMap = isIE11 ? ie11fingerprint(mapMethods) : tagTester('Map');
+var isMap = isIE11 ? ie11fingerprint(mapMethods) : tagTester('Map');
-var isWeakMap = isIE11 ? ie11fingerprint(weakMapMethods) : tagTester('WeakMap');
+var isWeakMap = isIE11 ? ie11fingerprint(weakMapMethods) : tagTester('WeakMap');
-var isSet = isIE11 ? ie11fingerprint(setMethods) : tagTester('Set');
+var isSet = isIE11 ? ie11fingerprint(setMethods) : tagTester('Set');
-var isWeakSet = tagTester('WeakSet');
+var isWeakSet = tagTester('WeakSet');function values(obj) {
- var _keys = keys(obj);
- var length = _keys.length;
- var values = Array(length);
+ function values(obj) {
+ var _keys = keys(obj);
+ var length = _keys.length;
+ var values = Array(length);
for (var i = 0; i < length; i++) {
values[i] = obj[_keys[i]];
}
@@ -1586,10 +1593,10 @@ underscore-esm.js
- function pairs(obj) {
- var _keys = keys(obj);
- var length = _keys.length;
- var pairs = Array(length);
+ function pairs(obj) {
+ var _keys = keys(obj);
+ var length = _keys.length;
+ var pairs = Array(length);
for (var i = 0; i < length; i++) {
pairs[i] = [_keys[i], obj[_keys[i]]];
}
@@ -1609,10 +1616,10 @@ underscore-esm.js
- function invert(obj) {
+ function invert(obj) {
var result = {};
- var _keys = keys(obj);
- for (var i = 0, length = _keys.length; i < length; i++) {
+ var _keys = keys(obj);
+ for (var i = 0, length = _keys.length; i < length; i++) {
result[obj[_keys[i]]] = _keys[i];
}
return result;
@@ -1631,12 +1638,12 @@ underscore-esm.js
- function functions(obj) {
+ function functions(obj) {
var names = [];
for (var key in obj) {
- if (isFunction$1(obj[key])) names.push(key);
+ if (isFunction$1(obj[key])) names.push(key);
}
- return names.sort();
+ return names.sort();
}
@@ -1652,15 +1659,15 @@ underscore-esm.js
- function createAssigner(keysFunc, defaults) {
- return function(obj) {
- var length = arguments.length;
- if (defaults) obj = Object(obj);
+ function createAssigner(keysFunc, defaults) {
+ return function(obj) {
+ var length = arguments.length;
+ if (defaults) obj = Object(obj);
if (length < 2 || obj == null) return obj;
for (var index = 1; index < length; index++) {
- var source = arguments[index],
- keys = keysFunc(source),
- l = keys.length;
+ var source = arguments[index],
+ keys = keysFunc(source),
+ l = keys.length;
for (var i = 0; i < l; i++) {
var key = keys[i];
if (!defaults || obj[key] === void 0) obj[key] = source[key];
@@ -1683,7 +1690,7 @@ underscore-esm.js
- var extend = createAssigner(allKeys);
+ var extend = createAssigner(allKeys);
@@ -1700,7 +1707,7 @@ underscore-esm.js
- var extendOwn = createAssigner(keys);
+ var extendOwn = createAssigner(keys);
@@ -1715,7 +1722,7 @@ underscore-esm.js
- var defaults = createAssigner(allKeys, true);
+ var defaults = createAssigner(allKeys, true);
@@ -1730,8 +1737,8 @@ underscore-esm.js
- function ctor() {
- return function(){};
+ function ctor() {
+ return function(){};
}
@@ -1747,13 +1754,13 @@ underscore-esm.js
- function baseCreate(prototype) {
- if (!isObject(prototype)) return {};
- if (nativeCreate) return nativeCreate(prototype);
- var Ctor = ctor();
- Ctor.prototype = prototype;
- var result = new Ctor;
- Ctor.prototype = null;
+ function baseCreate(prototype) {
+ if (!isObject(prototype)) return {};
+ if (nativeCreate) return nativeCreate(prototype);
+ var Ctor = ctor();
+ Ctor.prototype = prototype;
+ var result = new Ctor;
+ Ctor.prototype = null;
return result;
}
@@ -1772,9 +1779,9 @@ underscore-esm.js
- function create(prototype, props) {
- var result = baseCreate(prototype);
- if (props) extendOwn(result, props);
+ function create(prototype, props) {
+ var result = baseCreate(prototype);
+ if (props) extendOwn(result, props);
return result;
}
@@ -1791,9 +1798,9 @@ underscore-esm.js
- function clone(obj) {
- if (!isObject(obj)) return obj;
- return isArray(obj) ? obj.slice() : extend({}, obj);
+ function clone(obj) {
+ if (!isObject(obj)) return obj;
+ return isArray(obj) ? obj.slice() : extend({}, obj);
}
@@ -1811,8 +1818,8 @@ underscore-esm.js
- function tap(obj, interceptor) {
- interceptor(obj);
+ function tap(obj, interceptor) {
+ interceptor(obj);
return obj;
}
@@ -1830,8 +1837,8 @@ underscore-esm.js
- function toPath$1(path) {
- return isArray(path) ? path : [path];
+ function toPath$1(path) {
+ return isArray(path) ? path : [path];
}
_$1.toPath = toPath$1;
@@ -1849,8 +1856,8 @@ underscore-esm.js
- function toPath(path) {
- return _$1.toPath(path);
+ function toPath(path) {
+ return _$1.toPath(path);
}
@@ -1866,8 +1873,8 @@ underscore-esm.js
- function deepGet(obj, path) {
- var length = path.length;
+ function deepGet(obj, path) {
+ var length = path.length;
for (var i = 0; i < length; i++) {
if (obj == null) return void 0;
obj = obj[path[i]];
@@ -1891,9 +1898,9 @@ underscore-esm.js
- function get(object, path, defaultValue) {
- var value = deepGet(object, toPath(path));
- return isUndefined(value) ? defaultValue : value;
+ function get(object, path, defaultValue) {
+ var value = deepGet(object, toPath(path));
+ return isUndefined(value) ? defaultValue : value;
}
@@ -1911,12 +1918,12 @@ underscore-esm.js
- function has(obj, path) {
- path = toPath(path);
- var length = path.length;
+ function has(obj, path) {
+ path = toPath(path);
+ var length = path.length;
for (var i = 0; i < length; i++) {
var key = path[i];
- if (!has$1(obj, key)) return false;
+ if (!has$1(obj, key)) return false;
obj = obj[key];
}
return !!length;
@@ -1935,7 +1942,7 @@ underscore-esm.js
- function identity(value) {
+ function identity(value) {
return value;
}
@@ -1953,10 +1960,10 @@ underscore-esm.js
- function matcher(attrs) {
- attrs = extendOwn({}, attrs);
- return function(obj) {
- return isMatch(obj, attrs);
+ function matcher(attrs) {
+ attrs = extendOwn({}, attrs);
+ return function(obj) {
+ return isMatch(obj, attrs);
};
}
@@ -1974,10 +1981,10 @@ underscore-esm.js
- function property(path) {
- path = toPath(path);
- return function(obj) {
- return deepGet(obj, path);
+ function property(path) {
+ path = toPath(path);
+ return function(obj) {
+ return deepGet(obj, path);
};
}
@@ -1996,11 +2003,11 @@ underscore-esm.js
- function optimizeCb(func, context, argCount) {
+ function optimizeCb(func, context, argCount) {
if (context === void 0) return func;
switch (argCount == null ? 3 : argCount) {
- case 1: return function(value) {
- return func.call(context, value);
+ case 1: return function(value) {
+ return func.call(context, value);
};
@@ -2016,15 +2023,15 @@ underscore-esm.js
- case 3: return function(value, index, collection) {
- return func.call(context, value, index, collection);
+ case 3: return function(value, index, collection) {
+ return func.call(context, value, index, collection);
};
- case 4: return function(accumulator, value, index, collection) {
- return func.call(context, accumulator, value, index, collection);
+ case 4: return function(accumulator, value, index, collection) {
+ return func.call(context, accumulator, value, index, collection);
};
}
- return function() {
- return func.apply(context, arguments);
+ return function() {
+ return func.apply(context, arguments);
};
}
@@ -2043,11 +2050,11 @@ underscore-esm.js
- function baseIteratee(value, context, argCount) {
+ function baseIteratee(value, context, argCount) {
if (value == null) return identity;
- if (isFunction$1(value)) return optimizeCb(value, context, argCount);
- if (isObject(value) && !isArray(value)) return matcher(value);
- return property(value);
+ if (isFunction$1(value)) return optimizeCb(value, context, argCount);
+ if (isObject(value) && !isArray(value)) return matcher(value);
+ return property(value);
}
@@ -2065,8 +2072,8 @@ underscore-esm.js
- function iteratee(value, context) {
- return baseIteratee(value, context, Infinity);
+ function iteratee(value, context) {
+ return baseIteratee(value, context, Infinity);
}
_$1.iteratee = iteratee;
@@ -2084,9 +2091,9 @@ underscore-esm.js
- function cb(value, context, argCount) {
- if (_$1.iteratee !== iteratee) return _$1.iteratee(value, context);
- return baseIteratee(value, context, argCount);
+ function cb(value, context, argCount) {
+ if (_$1.iteratee !== iteratee) return _$1.iteratee(value, context);
+ return baseIteratee(value, context, argCount);
}
@@ -2103,14 +2110,14 @@ underscore-esm.js
- function mapObject(obj, iteratee, context) {
- iteratee = cb(iteratee, context);
- var _keys = keys(obj),
- length = _keys.length,
+ function mapObject(obj, iteratee, context) {
+ iteratee = cb(iteratee, context);
+ var _keys = keys(obj),
+ length = _keys.length,
results = {};
for (var index = 0; index < length; index++) {
var currentKey = _keys[index];
- results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
+ results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
}
return results;
}
@@ -2128,7 +2135,7 @@ underscore-esm.js
- function noop(){}
+ function noop(){}
@@ -2143,10 +2150,10 @@ underscore-esm.js
- function propertyOf(obj) {
+ function propertyOf(obj) {
if (obj == null) return noop;
- return function(path) {
- return get(obj, path);
+ return function(path) {
+ return get(obj, path);
};
}
@@ -2163,10 +2170,10 @@ underscore-esm.js
- function times(n, iteratee, context) {
- var accum = Array(Math.max(0, n));
- iteratee = optimizeCb(iteratee, context, 1);
- for (var i = 0; i < n; i++) accum[i] = iteratee(i);
+ function times(n, iteratee, context) {
+ var accum = Array(Math.max(0, n));
+ iteratee = optimizeCb(iteratee, context, 1);
+ for (var i = 0; i < n; i++) accum[i] = iteratee(i);
return accum;
}
@@ -2183,12 +2190,12 @@ underscore-esm.js
- function random(min, max) {
+ function random(min, max) {
if (max == null) {
max = min;
min = 0;
}
- return min + Math.floor(Math.random() * (max - min + 1));
+ return min + Math.floor(Math.random() * (max - min + 1));
}
@@ -2204,8 +2211,8 @@ underscore-esm.js
- var now = Date.now || function() {
- return new Date().getTime();
+ var now = Date.now || function() {
+ return new Date().getTime();
};
@@ -2222,8 +2229,8 @@ underscore-esm.js
- function createEscaper(map) {
- var escaper = function(match) {
+ function createEscaper(map) {
+ var escaper = function(match) {
return map[match];
};
@@ -2240,12 +2247,12 @@ underscore-esm.js
- var source = '(?:' + keys(map).join('|') + ')';
- var testRegexp = RegExp(source);
- var replaceRegexp = RegExp(source, 'g');
- return function(string) {
- string = string == null ? '' : '' + string;
- return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
+ var source = '(?:' + keys(map).join('|') + ')';
+ var testRegexp = RegExp(source);
+ var replaceRegexp = RegExp(source, 'g');
+ return function(string) {
+ string = string == null ? '' : '' + string;
+ return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
};
}
@@ -2263,12 +2270,12 @@ underscore-esm.js
var escapeMap = {
- '&': '&',
- '<': '<',
- '>': '>',
- '"': '"',
- "'": ''',
- '`': '`'
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ "'": ''',
+ '`': '`'
};
@@ -2284,7 +2291,7 @@ underscore-esm.js
- var _escape = createEscaper(escapeMap);
+ var _escape = createEscaper(escapeMap);
@@ -2299,7 +2306,7 @@ underscore-esm.js
- var unescapeMap = invert(escapeMap);
+ var unescapeMap = invert(escapeMap);
@@ -2314,7 +2321,7 @@ underscore-esm.js
- var _unescape = createEscaper(unescapeMap);
+ var _unescape = createEscaper(unescapeMap);
@@ -2332,8 +2339,8 @@ underscore-esm.js
var templateSettings = _$1.templateSettings = {
evaluate: /<%([\s\S]+?)%>/g,
- interpolate: /<%=([\s\S]+?)%>/g,
- escape: /<%-([\s\S]+?)%>/g
+ interpolate: /<%=([\s\S]+?)%>/g,
+ escape: /<%-([\s\S]+?)%>/g
};
@@ -2368,18 +2375,18 @@ underscore-esm.js
var escapes = {
- "'": "'",
- '\\': '\\',
- '\r': 'r',
- '\n': 'n',
- '\u2028': 'u2028',
- '\u2029': 'u2029'
+ "'": "'",
+ '\\': '\\',
+ '\r': 'r',
+ '\n': 'n',
+ '\u2028': 'u2028',
+ '\u2029': 'u2029'
};
-var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g;
+var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g;
-function escapeChar(match) {
- return '\\' + escapes[match];
+function escapeChar(match) {
+ return '\\' + escapes[match];
}
@@ -2417,9 +2424,9 @@ underscore-esm.js
- function template(text, settings, oldSettings) {
+ function template(text, settings, oldSettings) {
if (!settings && oldSettings) settings = oldSettings;
- settings = defaults({}, settings, _$1.templateSettings);
+ settings = defaults({}, settings, _$1.templateSettings);
@@ -2434,11 +2441,11 @@ underscore-esm.js
- var matcher = RegExp([
- (settings.escape || noMatch).source,
- (settings.interpolate || noMatch).source,
- (settings.evaluate || noMatch).source
- ].join('|') + '|$', 'g');
+ var matcher = RegExp([
+ (settings.escape || noMatch).source,
+ (settings.interpolate || noMatch).source,
+ (settings.evaluate || noMatch).source
+ ].join('|') + '|$', 'g');
@@ -2454,17 +2461,17 @@ underscore-esm.js
var index = 0;
- var source = "__p+='";
- text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
- source += text.slice(index, offset).replace(escapeRegExp, escapeChar);
- index = offset + match.length;
+ var source = "__p+='";
+ text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
+ source += text.slice(index, offset).replace(escapeRegExp, escapeChar);
+ index = offset + match.length;
if (escape) {
- source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
+ source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
} else if (interpolate) {
- source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
+ source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
} else if (evaluate) {
- source += "';\n" + evaluate + "\n__p+='";
+ source += "';\n" + evaluate + "\n__p+='";
}
@@ -2482,9 +2489,9 @@ underscore-esm.js
return match;
});
- source += "';\n";
+ source += "';\n";
- var argument = settings.variable;
+ var argument = settings.variable;
if (argument) {
@@ -2500,8 +2507,8 @@ underscore-esm.js
- if (!bareIdentifier.test(argument)) throw new Error(
- 'variable is not a bare identifier: ' + argument
+ if (!bareIdentifier.test(argument)) throw new Error(
+ 'variable is not a bare identifier: ' + argument
);
} else {
@@ -2518,24 +2525,24 @@ underscore-esm.js
- source = 'with(obj||{}){\n' + source + '}\n';
- argument = 'obj';
+ source = 'with(obj||{}){\n' + source + '}\n';
+ argument = 'obj';
}
- source = "var __t,__p='',__j=Array.prototype.join," +
- "print=function(){__p+=__j.call(arguments,'');};\n" +
- source + 'return __p;\n';
+ source = "var __t,__p='',__j=Array.prototype.join," +
+ "print=function(){__p+=__j.call(arguments,'');};\n" +
+ source + 'return __p;\n';
var render;
try {
- render = new Function(argument, '_', source);
+ render = new Function(argument, '_', source);
} catch (e) {
- e.source = source;
+ e.source = source;
throw e;
}
- var template = function(data) {
- return render.call(this, data, _$1);
+ var template = function(data) {
+ return render.call(this, data, _$1);
};
@@ -2551,7 +2558,7 @@ underscore-esm.js
- template.source = 'function(' + argument + '){\n' + source + '}';
+ template.source = 'function(' + argument + '){\n' + source + '}';
return template;
}
@@ -2571,19 +2578,19 @@ underscore-esm.js
- function result(obj, path, fallback) {
- path = toPath(path);
- var length = path.length;
+ function result(obj, path, fallback) {
+ path = toPath(path);
+ var length = path.length;
if (!length) {
- return isFunction$1(fallback) ? fallback.call(obj) : fallback;
+ return isFunction$1(fallback) ? fallback.call(obj) : fallback;
}
for (var i = 0; i < length; i++) {
var prop = obj == null ? void 0 : obj[path[i]];
if (prop === void 0) {
prop = fallback;
- i = length; // Ensure we don't continue iterating.
+ i = length; // Ensure we don't continue iterating.
}
- obj = isFunction$1(prop) ? prop.call(obj) : prop;
+ obj = isFunction$1(prop) ? prop.call(obj) : prop;
}
return obj;
}
@@ -2603,8 +2610,8 @@ underscore-esm.js
var idCounter = 0;
-function uniqueId(prefix) {
- var id = ++idCounter + '';
+function uniqueId(prefix) {
+ var id = ++idCounter + '';
return prefix ? prefix + id : id;
}
@@ -2621,9 +2628,9 @@ underscore-esm.js
- function chain(obj) {
- var instance = _$1(obj);
- instance._chain = true;
+ function chain(obj) {
+ var instance = _$1(obj);
+ instance._chain = true;
return instance;
}
@@ -2642,11 +2649,11 @@ underscore-esm.js
- function executeBound(sourceFunc, boundFunc, context, callingContext, args) {
- if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);
- var self = baseCreate(sourceFunc.prototype);
- var result = sourceFunc.apply(self, args);
- if (isObject(result)) return result;
+ function executeBound(sourceFunc, boundFunc, context, callingContext, args) {
+ if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);
+ var self = baseCreate(sourceFunc.prototype);
+ var result = sourceFunc.apply(self, args);
+ if (isObject(result)) return result;
return self;
}
@@ -2666,21 +2673,21 @@ underscore-esm.js
- var partial = restArguments(function(func, boundArgs) {
- var placeholder = partial.placeholder;
- var bound = function() {
- var position = 0, length = boundArgs.length;
- var args = Array(length);
+ var partial = restArguments(function(func, boundArgs) {
+ var placeholder = partial.placeholder;
+ var bound = function() {
+ var position = 0, length = boundArgs.length;
+ var args = Array(length);
for (var i = 0; i < length; i++) {
- args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];
+ args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];
}
- while (position < arguments.length) args.push(arguments[position++]);
- return executeBound(func, bound, this, this, args);
+ while (position < arguments.length) args.push(arguments[position++]);
+ return executeBound(func, bound, this, this, args);
};
return bound;
});
-partial.placeholder = _$1;
+partial.placeholder = _$1;
@@ -2696,10 +2703,10 @@ underscore-esm.js
- var bind = restArguments(function(func, context, args) {
- if (!isFunction$1(func)) throw new TypeError('Bind must be called on a function');
- var bound = restArguments(function(callArgs) {
- return executeBound(func, bound, context, this, args.concat(callArgs));
+ var bind = restArguments(function(func, context, args) {
+ if (!isFunction$1(func)) throw new TypeError('Bind must be called on a function');
+ var bound = restArguments(function(callArgs) {
+ return executeBound(func, bound, context, this, args.concat(callArgs));
});
return bound;
});
@@ -2720,7 +2727,7 @@ underscore-esm.js
- var isArrayLike = createSizePropertyCheck(getLength);
+ var isArrayLike = createSizePropertyCheck(getLength);
@@ -2735,17 +2742,17 @@ underscore-esm.js
- function flatten$1(input, depth, strict, output) {
+ function flatten$1(input, depth, strict, output) {
output = output || [];
if (!depth && depth !== 0) {
- depth = Infinity;
+ depth = Infinity;
} else if (depth <= 0) {
- return output.concat(input);
+ return output.concat(input);
}
- var idx = output.length;
- for (var i = 0, length = getLength(input); i < length; i++) {
+ var idx = output.length;
+ for (var i = 0, length = getLength(input); i < length; i++) {
var value = input[i];
- if (isArrayLike(value) && (isArray(value) || isArguments$1(value))) {
+ if (isArrayLike(value) && (isArray(value) || isArguments$1(value))) {
@@ -2761,10 +2768,10 @@ underscore-esm.js
if (depth > 1) {
- flatten$1(value, depth - 1, strict, output);
- idx = output.length;
+ flatten$1(value, depth - 1, strict, output);
+ idx = output.length;
} else {
- var j = 0, len = value.length;
+ var j = 0, len = value.length;
while (j < len) output[idx++] = value[j++];
}
} else if (!strict) {
@@ -2789,13 +2796,13 @@ underscore-esm.js
- var bindAll = restArguments(function(obj, keys) {
- keys = flatten$1(keys, false, false);
- var index = keys.length;
- if (index < 1) throw new Error('bindAll must be passed function names');
+ var bindAll = restArguments(function(obj, keys) {
+ keys = flatten$1(keys, false, false);
+ var index = keys.length;
+ if (index < 1) throw new Error('bindAll must be passed function names');
while (index--) {
var key = keys[index];
- obj[key] = bind(obj[key], obj);
+ obj[key] = bind(obj[key], obj);
}
return obj;
});
@@ -2813,14 +2820,14 @@ underscore-esm.js
- function memoize(func, hasher) {
- var memoize = function(key) {
- var cache = memoize.cache;
- var address = '' + (hasher ? hasher.apply(this, arguments) : key);
- if (!has$1(cache, address)) cache[address] = func.apply(this, arguments);
+ function memoize(func, hasher) {
+ var memoize = function(key) {
+ var cache = memoize.cache;
+ var address = '' + (hasher ? hasher.apply(this, arguments) : key);
+ if (!has$1(cache, address)) cache[address] = func.apply(this, arguments);
return cache[address];
};
- memoize.cache = {};
+ memoize.cache = {};
return memoize;
}
@@ -2838,9 +2845,9 @@ underscore-esm.js
- var delay = restArguments(function(func, wait, args) {
- return setTimeout(function() {
- return func.apply(null, args);
+ var delay = restArguments(function(func, wait, args) {
+ return setTimeout(function() {
+ return func.apply(null, args);
}, wait);
});
@@ -2858,7 +2865,7 @@ underscore-esm.js
- var defer = partial(delay, _$1, 1);
+ var defer = partial(delay, _$1, 1);
@@ -2877,40 +2884,40 @@ underscore-esm.js
- function throttle(func, wait, options) {
+ function throttle(func, wait, options) {
var timeout, context, args, result;
var previous = 0;
if (!options) options = {};
- var later = function() {
- previous = options.leading === false ? 0 : now();
+ var later = function() {
+ previous = options.leading === false ? 0 : now();
timeout = null;
- result = func.apply(context, args);
+ result = func.apply(context, args);
if (!timeout) context = args = null;
};
- var throttled = function() {
- var _now = now();
- if (!previous && options.leading === false) previous = _now;
+ var throttled = function() {
+ var _now = now();
+ if (!previous && options.leading === false) previous = _now;
var remaining = wait - (_now - previous);
- context = this;
- args = arguments;
+ context = this;
+ args = arguments;
if (remaining <= 0 || remaining > wait) {
if (timeout) {
- clearTimeout(timeout);
+ clearTimeout(timeout);
timeout = null;
}
previous = _now;
- result = func.apply(context, args);
+ result = func.apply(context, args);
if (!timeout) context = args = null;
- } else if (!timeout && options.trailing !== false) {
- timeout = setTimeout(later, remaining);
+ } else if (!timeout && options.trailing !== false) {
+ timeout = setTimeout(later, remaining);
}
- return result;
+ return result;
};
- throttled.cancel = function() {
- clearTimeout(timeout);
+ throttled.cancel = function() {
+ clearTimeout(timeout);
previous = 0;
timeout = context = args = null;
};
@@ -2934,16 +2941,16 @@ underscore-esm.js
- function debounce(func, wait, immediate) {
+ function debounce(func, wait, immediate) {
var timeout, previous, args, result, context;
- var later = function() {
- var passed = now() - previous;
+ var later = function() {
+ var passed = now() - previous;
if (wait > passed) {
- timeout = setTimeout(later, wait - passed);
- } else {
+ timeout = setTimeout(later, wait - passed);
+ } else {
timeout = null;
- if (!immediate) result = func.apply(context, args);
+ if (!immediate) result = func.apply(context, args);
@@ -2962,19 +2969,19 @@ underscore-esm.js
}
};
- var debounced = restArguments(function(_args) {
- context = this;
+ var debounced = restArguments(function(_args) {
+ context = this;
args = _args;
- previous = now();
+ previous = now();
if (!timeout) {
- timeout = setTimeout(later, wait);
- if (immediate) result = func.apply(context, args);
+ timeout = setTimeout(later, wait);
+ if (immediate) result = func.apply(context, args);
}
- return result;
+ return result;
});
- debounced.cancel = function() {
- clearTimeout(timeout);
+ debounced.cancel = function() {
+ clearTimeout(timeout);
timeout = args = context = null;
};
@@ -2996,8 +3003,8 @@ underscore-esm.js
- function wrap(func, wrapper) {
- return partial(wrapper, func);
+ function wrap(func, wrapper) {
+ return partial(wrapper, func);
}
@@ -3013,9 +3020,9 @@ underscore-esm.js
- function negate(predicate) {
- return function() {
- return !predicate.apply(this, arguments);
+ function negate(predicate) {
+ return function() {
+ return !predicate.apply(this, arguments);
};
}
@@ -3033,13 +3040,13 @@ underscore-esm.js
- function compose() {
- var args = arguments;
- var start = args.length - 1;
- return function() {
+ function compose() {
+ var args = arguments;
+ var start = args.length - 1;
+ return function() {
var i = start;
- var result = args[start].apply(this, arguments);
- while (i--) result = args[i].call(this, result);
+ var result = args[start].apply(this, arguments);
+ while (i--) result = args[i].call(this, result);
return result;
};
}
@@ -3057,10 +3064,10 @@ underscore-esm.js
- function after(times, func) {
- return function() {
+ function after(times, func) {
+ return function() {
if (--times < 1) {
- return func.apply(this, arguments);
+ return func.apply(this, arguments);
}
};
}
@@ -3079,11 +3086,11 @@ underscore-esm.js
- function before(times, func) {
+ function before(times, func) {
var memo;
- return function() {
+ return function() {
if (--times > 0) {
- memo = func.apply(this, arguments);
+ memo = func.apply(this, arguments);
}
if (times <= 1) func = null;
return memo;
@@ -3104,7 +3111,7 @@ underscore-esm.js
- var once = partial(before, 2);
+ var once = partial(before, 2);
@@ -3119,12 +3126,12 @@ underscore-esm.js
- function findKey(obj, predicate, context) {
- predicate = cb(predicate, context);
- var _keys = keys(obj), key;
- for (var i = 0, length = _keys.length; i < length; i++) {
+ function findKey(obj, predicate, context) {
+ predicate = cb(predicate, context);
+ var _keys = keys(obj), key;
+ for (var i = 0, length = _keys.length; i < length; i++) {
key = _keys[i];
- if (predicate(obj[key], key, obj)) return key;
+ if (predicate(obj[key], key, obj)) return key;
}
}
@@ -3141,15 +3148,15 @@ underscore-esm.js
- function createPredicateIndexFinder(dir) {
- return function(array, predicate, context) {
- predicate = cb(predicate, context);
- var length = getLength(array);
- var index = dir > 0 ? 0 : length - 1;
- for (; index >= 0 && index < length; index += dir) {
- if (predicate(array[index], index, array)) return index;
+ function createPredicateIndexFinder(dir) {
+ return function(array, predicate, context) {
+ predicate = cb(predicate, context);
+ var length = getLength(array);
+ var index = dir > 0 ? 0 : length - 1;
+ for (; index >= 0 && index < length; index += dir) {
+ if (predicate(array[index], index, array)) return index;
}
- return -1;
+ return -1;
};
}
@@ -3166,7 +3173,7 @@ underscore-esm.js
- var findIndex = createPredicateIndexFinder(1);
+ var findIndex = createPredicateIndexFinder(1);
@@ -3181,7 +3188,7 @@ underscore-esm.js
- var findLastIndex = createPredicateIndexFinder(-1);
+ var findLastIndex = createPredicateIndexFinder(-1);
@@ -3197,13 +3204,13 @@ underscore-esm.js
- function sortedIndex(array, obj, iteratee, context) {
- iteratee = cb(iteratee, context, 1);
- var value = iteratee(obj);
- var low = 0, high = getLength(array);
- while (low < high) {
- var mid = Math.floor((low + high) / 2);
- if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;
+ function sortedIndex(array, obj, iteratee, context) {
+ iteratee = cb(iteratee, context, 1);
+ var value = iteratee(obj);
+ var low = 0, high = getLength(array);
+ while (low < high) {
+ var mid = Math.floor((low + high) / 2);
+ if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;
}
return low;
}
@@ -3221,27 +3228,27 @@ underscore-esm.js
- function createIndexFinder(dir, predicateFind, sortedIndex) {
- return function(array, item, idx) {
- var i = 0, length = getLength(array);
- if (typeof idx == 'number') {
+ function createIndexFinder(dir, predicateFind, sortedIndex) {
+ return function(array, item, idx) {
+ var i = 0, length = getLength(array);
+ if (typeof idx == 'number') {
if (dir > 0) {
- i = idx >= 0 ? idx : Math.max(idx + length, i);
+ i = idx >= 0 ? idx : Math.max(idx + length, i);
} else {
- length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;
+ length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;
}
} else if (sortedIndex && idx && length) {
- idx = sortedIndex(array, item);
- return array[idx] === item ? idx : -1;
+ idx = sortedIndex(array, item);
+ return array[idx] === item ? idx : -1;
}
if (item !== item) {
- idx = predicateFind(slice.call(array, i, length), isNaN$1);
- return idx >= 0 ? idx + i : -1;
+ idx = predicateFind(slice.call(array, i, length), isNaN$1);
+ return idx >= 0 ? idx + i : -1;
}
for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {
if (array[idx] === item) return idx;
}
- return -1;
+ return -1;
};
}
@@ -3261,7 +3268,7 @@ underscore-esm.js
- var indexOf = createIndexFinder(1, findIndex, sortedIndex);
+ var indexOf = createIndexFinder(1, findIndex, sortedIndex);
@@ -3277,7 +3284,7 @@ underscore-esm.js
- var lastIndexOf = createIndexFinder(-1, findLastIndex);
+ var lastIndexOf = createIndexFinder(-1, findLastIndex);
@@ -3292,10 +3299,10 @@ underscore-esm.js
- function find(obj, predicate, context) {
- var keyFinder = isArrayLike(obj) ? findIndex : findKey;
- var key = keyFinder(obj, predicate, context);
- if (key !== void 0 && key !== -1) return obj[key];
+ function find(obj, predicate, context) {
+ var keyFinder = isArrayLike(obj) ? findIndex : findKey;
+ var key = keyFinder(obj, predicate, context);
+ if (key !== void 0 && key !== -1) return obj[key];
}
@@ -3312,8 +3319,8 @@ underscore-esm.js
- function findWhere(obj, attrs) {
- return find(obj, matcher(attrs));
+ function findWhere(obj, attrs) {
+ return find(obj, matcher(attrs));
}
@@ -3332,17 +3339,17 @@ underscore-esm.js
- function each(obj, iteratee, context) {
- iteratee = optimizeCb(iteratee, context);
+ function each(obj, iteratee, context) {
+ iteratee = optimizeCb(iteratee, context);
var i, length;
- if (isArrayLike(obj)) {
- for (i = 0, length = obj.length; i < length; i++) {
- iteratee(obj[i], i, obj);
+ if (isArrayLike(obj)) {
+ for (i = 0, length = obj.length; i < length; i++) {
+ iteratee(obj[i], i, obj);
}
} else {
- var _keys = keys(obj);
- for (i = 0, length = _keys.length; i < length; i++) {
- iteratee(obj[_keys[i]], _keys[i], obj);
+ var _keys = keys(obj);
+ for (i = 0, length = _keys.length; i < length; i++) {
+ iteratee(obj[_keys[i]], _keys[i], obj);
}
}
return obj;
@@ -3361,14 +3368,14 @@ underscore-esm.js
- function map(obj, iteratee, context) {
- iteratee = cb(iteratee, context);
- var _keys = !isArrayLike(obj) && keys(obj),
- length = (_keys || obj).length,
- results = Array(length);
+ function map(obj, iteratee, context) {
+ iteratee = cb(iteratee, context);
+ var _keys = !isArrayLike(obj) && keys(obj),
+ length = (_keys || obj).length,
+ results = Array(length);
for (var index = 0; index < length; index++) {
var currentKey = _keys ? _keys[index] : index;
- results[index] = iteratee(obj[currentKey], currentKey, obj);
+ results[index] = iteratee(obj[currentKey], currentKey, obj);
}
return results;
}
@@ -3386,7 +3393,7 @@ underscore-esm.js
- function createReduce(dir) {
+ function createReduce(dir) {
@@ -3402,9 +3409,9 @@ underscore-esm.js
- var reducer = function(obj, iteratee, memo, initial) {
- var _keys = !isArrayLike(obj) && keys(obj),
- length = (_keys || obj).length,
+ var reducer = function(obj, iteratee, memo, initial) {
+ var _keys = !isArrayLike(obj) && keys(obj),
+ length = (_keys || obj).length,
index = dir > 0 ? 0 : length - 1;
if (!initial) {
memo = obj[_keys ? _keys[index] : index];
@@ -3412,14 +3419,14 @@ underscore-esm.js
}
for (; index >= 0 && index < length; index += dir) {
var currentKey = _keys ? _keys[index] : index;
- memo = iteratee(memo, obj[currentKey], currentKey, obj);
+ memo = iteratee(memo, obj[currentKey], currentKey, obj);
}
return memo;
};
- return function(obj, iteratee, memo, context) {
- var initial = arguments.length >= 3;
- return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);
+ return function(obj, iteratee, memo, context) {
+ var initial = arguments.length >= 3;
+ return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);
};
}
@@ -3437,7 +3444,7 @@ underscore-esm.js
- var reduce = createReduce(1);
+ var reduce = createReduce(1);
@@ -3452,7 +3459,7 @@ underscore-esm.js
- var reduceRight = createReduce(-1);
+ var reduceRight = createReduce(-1);
@@ -3467,11 +3474,11 @@ underscore-esm.js
- function filter(obj, predicate, context) {
+ function filter(obj, predicate, context) {
var results = [];
- predicate = cb(predicate, context);
- each(obj, function(value, index, list) {
- if (predicate(value, index, list)) results.push(value);
+ predicate = cb(predicate, context);
+ each(obj, function(value, index, list) {
+ if (predicate(value, index, list)) results.push(value);
});
return results;
}
@@ -3489,8 +3496,8 @@ underscore-esm.js
- function reject(obj, predicate, context) {
- return filter(obj, negate(cb(predicate)), context);
+ function reject(obj, predicate, context) {
+ return filter(obj, negate(cb(predicate)), context);
}
@@ -3506,13 +3513,13 @@ underscore-esm.js
- function every(obj, predicate, context) {
- predicate = cb(predicate, context);
- var _keys = !isArrayLike(obj) && keys(obj),
- length = (_keys || obj).length;
+ function every(obj, predicate, context) {
+ predicate = cb(predicate, context);
+ var _keys = !isArrayLike(obj) && keys(obj),
+ length = (_keys || obj).length;
for (var index = 0; index < length; index++) {
var currentKey = _keys ? _keys[index] : index;
- if (!predicate(obj[currentKey], currentKey, obj)) return false;
+ if (!predicate(obj[currentKey], currentKey, obj)) return false;
}
return true;
}
@@ -3530,13 +3537,13 @@ underscore-esm.js
- function some(obj, predicate, context) {
- predicate = cb(predicate, context);
- var _keys = !isArrayLike(obj) && keys(obj),
- length = (_keys || obj).length;
+ function some(obj, predicate, context) {
+ predicate = cb(predicate, context);
+ var _keys = !isArrayLike(obj) && keys(obj),
+ length = (_keys || obj).length;
for (var index = 0; index < length; index++) {
var currentKey = _keys ? _keys[index] : index;
- if (predicate(obj[currentKey], currentKey, obj)) return true;
+ if (predicate(obj[currentKey], currentKey, obj)) return true;
}
return false;
}
@@ -3554,10 +3561,10 @@ underscore-esm.js
- function contains(obj, item, fromIndex, guard) {
- if (!isArrayLike(obj)) obj = values(obj);
- if (typeof fromIndex != 'number' || guard) fromIndex = 0;
- return indexOf(obj, item, fromIndex) >= 0;
+ function contains(obj, item, fromIndex, guard) {
+ if (!isArrayLike(obj)) obj = values(obj);
+ if (typeof fromIndex != 'number' || guard) fromIndex = 0;
+ return indexOf(obj, item, fromIndex) >= 0;
}
@@ -3573,25 +3580,25 @@ underscore-esm.js
- var invoke = restArguments(function(obj, path, args) {
+ var invoke = restArguments(function(obj, path, args) {
var contextPath, func;
- if (isFunction$1(path)) {
+ if (isFunction$1(path)) {
func = path;
} else {
- path = toPath(path);
- contextPath = path.slice(0, -1);
- path = path[path.length - 1];
+ path = toPath(path);
+ contextPath = path.slice(0, -1);
+ path = path[path.length - 1];
}
- return map(obj, function(context) {
+ return map(obj, function(context) {
var method = func;
if (!method) {
- if (contextPath && contextPath.length) {
- context = deepGet(context, contextPath);
+ if (contextPath && contextPath.length) {
+ context = deepGet(context, contextPath);
}
if (context == null) return void 0;
method = context[path];
}
- return method == null ? method : method.apply(context, args);
+ return method == null ? method : method.apply(context, args);
});
});
@@ -3608,8 +3615,8 @@ underscore-esm.js
- function pluck(obj, key) {
- return map(obj, property(key));
+ function pluck(obj, key) {
+ return map(obj, property(key));
}
@@ -3626,8 +3633,8 @@ underscore-esm.js
- function where(obj, attrs) {
- return filter(obj, matcher(attrs));
+ function where(obj, attrs) {
+ return filter(obj, matcher(attrs));
}
@@ -3643,22 +3650,22 @@ underscore-esm.js
- function max(obj, iteratee, context) {
- var result = -Infinity, lastComputed = -Infinity,
+ function max(obj, iteratee, context) {
+ var result = -Infinity, lastComputed = -Infinity,
value, computed;
- if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {
- obj = isArrayLike(obj) ? obj : values(obj);
- for (var i = 0, length = obj.length; i < length; i++) {
+ if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null)) {
+ obj = isArrayLike(obj) ? obj : values(obj);
+ for (var i = 0, length = obj.length; i < length; i++) {
value = obj[i];
if (value != null && value > result) {
result = value;
}
}
} else {
- iteratee = cb(iteratee, context);
- each(obj, function(v, index, list) {
- computed = iteratee(v, index, list);
- if (computed > lastComputed || computed === -Infinity && result === -Infinity) {
+ iteratee = cb(iteratee, context);
+ each(obj, function(v, index, list) {
+ computed = iteratee(v, index, list);
+ if (computed > lastComputed || (computed === -Infinity && result === -Infinity)) {
result = v;
lastComputed = computed;
}
@@ -3680,22 +3687,22 @@ underscore-esm.js
- function min(obj, iteratee, context) {
- var result = Infinity, lastComputed = Infinity,
+ function min(obj, iteratee, context) {
+ var result = Infinity, lastComputed = Infinity,
value, computed;
- if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {
- obj = isArrayLike(obj) ? obj : values(obj);
- for (var i = 0, length = obj.length; i < length; i++) {
+ if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null)) {
+ obj = isArrayLike(obj) ? obj : values(obj);
+ for (var i = 0, length = obj.length; i < length; i++) {
value = obj[i];
if (value != null && value < result) {
result = value;
}
}
} else {
- iteratee = cb(iteratee, context);
- each(obj, function(v, index, list) {
- computed = iteratee(v, index, list);
- if (computed < lastComputed || computed === Infinity && result === Infinity) {
+ iteratee = cb(iteratee, context);
+ each(obj, function(v, index, list) {
+ computed = iteratee(v, index, list);
+ if (computed < lastComputed || (computed === Infinity && result === Infinity)) {
result = v;
lastComputed = computed;
}
@@ -3718,10 +3725,10 @@ underscore-esm.js
var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;
-function toArray(obj) {
+function toArray(obj) {
if (!obj) return [];
- if (isArray(obj)) return slice.call(obj);
- if (isString(obj)) {
+ if (isArray(obj)) return slice.call(obj);
+ if (isString(obj)) {
@@ -3736,10 +3743,10 @@ underscore-esm.js
- return obj.match(reStrSymbol);
+ return obj.match(reStrSymbol);
}
- if (isArrayLike(obj)) return map(obj, identity);
- return values(obj);
+ if (isArrayLike(obj)) return map(obj, identity);
+ return values(obj);
}
@@ -3758,22 +3765,22 @@ underscore-esm.js
- function sample(obj, n, guard) {
+ function sample(obj, n, guard) {
if (n == null || guard) {
- if (!isArrayLike(obj)) obj = values(obj);
- return obj[random(obj.length - 1)];
+ if (!isArrayLike(obj)) obj = values(obj);
+ return obj[random(obj.length - 1)];
}
- var sample = toArray(obj);
- var length = getLength(sample);
- n = Math.max(Math.min(n, length), 0);
- var last = length - 1;
- for (var index = 0; index < n; index++) {
- var rand = random(index, last);
+ var sample = toArray(obj);
+ var length = getLength(sample);
+ n = Math.max(Math.min(n, length), 0);
+ var last = length - 1;
+ for (var index = 0; index < n; index++) {
+ var rand = random(index, last);
var temp = sample[index];
sample[index] = sample[rand];
sample[rand] = temp;
}
- return sample.slice(0, n);
+ return sample.slice(0, n);
}
@@ -3789,8 +3796,8 @@ underscore-esm.js
- function shuffle(obj) {
- return sample(obj, Infinity);
+ function shuffle(obj) {
+ return sample(obj, Infinity);
}
@@ -3806,24 +3813,24 @@ underscore-esm.js
- function sortBy(obj, iteratee, context) {
+ function sortBy(obj, iteratee, context) {
var index = 0;
- iteratee = cb(iteratee, context);
- return pluck(map(obj, function(value, key, list) {
+ iteratee = cb(iteratee, context);
+ return pluck(map(obj, function(value, key, list) {
return {
value: value,
index: index++,
- criteria: iteratee(value, key, list)
+ criteria: iteratee(value, key, list)
};
- }).sort(function(left, right) {
- var a = left.criteria;
- var b = right.criteria;
+ }).sort(function(left, right) {
+ var a = left.criteria;
+ var b = right.criteria;
if (a !== b) {
if (a > b || a === void 0) return 1;
- if (a < b || b === void 0) return -1;
+ if (a < b || b === void 0) return -1;
}
- return left.index - right.index;
- }), 'value');
+ return left.index - right.index;
+ }), 'value');
}
@@ -3839,13 +3846,13 @@ underscore-esm.js
- function group(behavior, partition) {
- return function(obj, iteratee, context) {
+ function group(behavior, partition) {
+ return function(obj, iteratee, context) {
var result = partition ? [[], []] : {};
- iteratee = cb(iteratee, context);
- each(obj, function(value, index) {
- var key = iteratee(value, index, obj);
- behavior(result, value, key);
+ iteratee = cb(iteratee, context);
+ each(obj, function(value, index) {
+ var key = iteratee(value, index, obj);
+ behavior(result, value, key);
});
return result;
};
@@ -3865,8 +3872,8 @@ underscore-esm.js
- var groupBy = group(function(result, value, key) {
- if (has$1(result, key)) result[key].push(value); else result[key] = [value];
+ var groupBy = group(function(result, value, key) {
+ if (has$1(result, key)) result[key].push(value); else result[key] = [value];
});
@@ -3883,7 +3890,7 @@ underscore-esm.js
- var indexBy = group(function(result, value, key) {
+ var indexBy = group(function(result, value, key) {
result[key] = value;
});
@@ -3902,8 +3909,8 @@ underscore-esm.js
- var countBy = group(function(result, value, key) {
- if (has$1(result, key)) result[key]++; else result[key] = 1;
+ var countBy = group(function(result, value, key) {
+ if (has$1(result, key)) result[key]++; else result[key] = 1;
});
@@ -3920,8 +3927,8 @@ underscore-esm.js
- var partition = group(function(result, value, pass) {
- result[pass ? 0 : 1].push(value);
+ var partition = group(function(result, value, pass) {
+ result[pass ? 0 : 1].push(value);
}, true);
@@ -3937,9 +3944,9 @@ underscore-esm.js
- function size(obj) {
+ function size(obj) {
if (obj == null) return 0;
- return isArrayLike(obj) ? obj.length : keys(obj).length;
+ return isArrayLike(obj) ? obj.length : keys(obj).length;
}
@@ -3956,7 +3963,7 @@ underscore-esm.js
- function keyInObj(value, key, obj) {
+ function keyInObj(value, key, obj) {
return key in obj;
}
@@ -3973,21 +3980,21 @@ underscore-esm.js
- var pick = restArguments(function(obj, keys) {
+ var pick = restArguments(function(obj, keys) {
var result = {}, iteratee = keys[0];
if (obj == null) return result;
- if (isFunction$1(iteratee)) {
- if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]);
- keys = allKeys(obj);
+ if (isFunction$1(iteratee)) {
+ if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]);
+ keys = allKeys(obj);
} else {
iteratee = keyInObj;
- keys = flatten$1(keys, false, false);
- obj = Object(obj);
+ keys = flatten$1(keys, false, false);
+ obj = Object(obj);
}
- for (var i = 0, length = keys.length; i < length; i++) {
+ for (var i = 0, length = keys.length; i < length; i++) {
var key = keys[i];
var value = obj[key];
- if (iteratee(value, key, obj)) result[key] = value;
+ if (iteratee(value, key, obj)) result[key] = value;
}
return result;
});
@@ -4005,18 +4012,18 @@ underscore-esm.js
- var omit = restArguments(function(obj, keys) {
+ var omit = restArguments(function(obj, keys) {
var iteratee = keys[0], context;
- if (isFunction$1(iteratee)) {
- iteratee = negate(iteratee);
- if (keys.length > 1) context = keys[1];
+ if (isFunction$1(iteratee)) {
+ iteratee = negate(iteratee);
+ if (keys.length > 1) context = keys[1];
} else {
- keys = map(flatten$1(keys, false, false), String);
- iteratee = function(value, key) {
- return !contains(keys, key);
+ keys = map(flatten$1(keys, false, false), String);
+ iteratee = function(value, key) {
+ return !contains(keys, key);
};
}
- return pick(obj, iteratee, context);
+ return pick(obj, iteratee, context);
});
@@ -4034,8 +4041,8 @@ underscore-esm.js
- function initial(array, n, guard) {
- return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
+ function initial(array, n, guard) {
+ return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
}
@@ -4052,10 +4059,10 @@ underscore-esm.js
- function first(array, n, guard) {
- if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
+ function first(array, n, guard) {
+ if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
if (n == null || guard) return array[0];
- return initial(array, array.length - n);
+ return initial(array, array.length - n);
}
@@ -4073,8 +4080,8 @@ underscore-esm.js
- function rest(array, n, guard) {
- return slice.call(array, n == null || guard ? 1 : n);
+ function rest(array, n, guard) {
+ return slice.call(array, n == null || guard ? 1 : n);
}
@@ -4091,10 +4098,10 @@ underscore-esm.js
- function last(array, n, guard) {
- if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
- if (n == null || guard) return array[array.length - 1];
- return rest(array, Math.max(0, array.length - n));
+ function last(array, n, guard) {
+ if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
+ if (n == null || guard) return array[array.length - 1];
+ return rest(array, Math.max(0, array.length - n));
}
@@ -4110,8 +4117,8 @@ underscore-esm.js
- function compact(array) {
- return filter(array, Boolean);
+ function compact(array) {
+ return filter(array, Boolean);
}
@@ -4128,8 +4135,8 @@ underscore-esm.js
- function flatten(array, depth) {
- return flatten$1(array, depth, false);
+ function flatten(array, depth) {
+ return flatten$1(array, depth, false);
}
@@ -4146,10 +4153,10 @@ underscore-esm.js
- var difference = restArguments(function(array, rest) {
- rest = flatten$1(rest, true, true);
- return filter(array, function(value){
- return !contains(rest, value);
+ var difference = restArguments(function(array, rest) {
+ rest = flatten$1(rest, true, true);
+ return filter(array, function(value){
+ return !contains(rest, value);
});
});
@@ -4166,8 +4173,8 @@ underscore-esm.js
- var without = restArguments(function(array, otherArrays) {
- return difference(array, otherArrays);
+ var without = restArguments(function(array, otherArrays) {
+ return difference(array, otherArrays);
});
@@ -4187,28 +4194,28 @@ underscore-esm.js
- function uniq(array, isSorted, iteratee, context) {
- if (!isBoolean(isSorted)) {
+ function uniq(array, isSorted, iteratee, context) {
+ if (!isBoolean(isSorted)) {
context = iteratee;
iteratee = isSorted;
isSorted = false;
}
- if (iteratee != null) iteratee = cb(iteratee, context);
+ if (iteratee != null) iteratee = cb(iteratee, context);
var result = [];
var seen = [];
- for (var i = 0, length = getLength(array); i < length; i++) {
+ for (var i = 0, length = getLength(array); i < length; i++) {
var value = array[i],
- computed = iteratee ? iteratee(value, i, array) : value;
+ computed = iteratee ? iteratee(value, i, array) : value;
if (isSorted && !iteratee) {
- if (!i || seen !== computed) result.push(value);
+ if (!i || seen !== computed) result.push(value);
seen = computed;
} else if (iteratee) {
- if (!contains(seen, computed)) {
- seen.push(computed);
- result.push(value);
+ if (!contains(seen, computed)) {
+ seen.push(computed);
+ result.push(value);
}
- } else if (!contains(result, value)) {
- result.push(value);
+ } else if (!contains(result, value)) {
+ result.push(value);
}
}
return result;
@@ -4228,8 +4235,8 @@ underscore-esm.js
- var union = restArguments(function(arrays) {
- return uniq(flatten$1(arrays, true, true));
+ var union = restArguments(function(arrays) {
+ return uniq(flatten$1(arrays, true, true));
});
@@ -4246,17 +4253,17 @@ underscore-esm.js
- function intersection(array) {
+ function intersection(array) {
var result = [];
- var argsLength = arguments.length;
- for (var i = 0, length = getLength(array); i < length; i++) {
+ var argsLength = arguments.length;
+ for (var i = 0, length = getLength(array); i < length; i++) {
var item = array[i];
- if (contains(result, item)) continue;
+ if (contains(result, item)) continue;
var j;
for (j = 1; j < argsLength; j++) {
- if (!contains(arguments[j], item)) break;
+ if (!contains(arguments[j], item)) break;
}
- if (j === argsLength) result.push(item);
+ if (j === argsLength) result.push(item);
}
return result;
}
@@ -4275,12 +4282,12 @@ underscore-esm.js
- function unzip(array) {
- var length = array && max(array, getLength).length || 0;
- var result = Array(length);
+ function unzip(array) {
+ var length = (array && max(array, getLength).length) || 0;
+ var result = Array(length);
for (var index = 0; index < length; index++) {
- result[index] = pluck(array, index);
+ result[index] = pluck(array, index);
}
return result;
}
@@ -4299,7 +4306,7 @@ underscore-esm.js
- var zip = restArguments(unzip);
+ var zip = restArguments(unzip);
@@ -4316,9 +4323,9 @@ underscore-esm.js
- function object(list, values) {
+ function object(list, values) {
var result = {};
- for (var i = 0, length = getLength(list); i < length; i++) {
+ for (var i = 0, length = getLength(list); i < length; i++) {
if (values) {
result[list[i]] = values[i];
} else {
@@ -4343,17 +4350,17 @@ underscore-esm.js
- function range(start, stop, step) {
+ function range(start, stop, step) {
if (stop == null) {
stop = start || 0;
start = 0;
}
if (!step) {
- step = stop < start ? -1 : 1;
+ step = stop < start ? -1 : 1;
}
- var length = Math.max(Math.ceil((stop - start) / step), 0);
- var range = Array(length);
+ var length = Math.max(Math.ceil((stop - start) / step), 0);
+ var range = Array(length);
for (var idx = 0; idx < length; idx++, start += step) {
range[idx] = start;
@@ -4376,12 +4383,12 @@ underscore-esm.js
- function chunk(array, count) {
+ function chunk(array, count) {
if (count == null || count < 1) return [];
var result = [];
- var i = 0, length = array.length;
+ var i = 0, length = array.length;
while (i < length) {
- result.push(slice.call(array, i, i += count));
+ result.push(slice.call(array, i, i += count));
}
return result;
}
@@ -4399,8 +4406,8 @@ underscore-esm.js
- function chainResult(instance, obj) {
- return instance._chain ? _$1(obj).chain() : obj;
+ function chainResult(instance, obj) {
+ return instance._chain ? _$1(obj).chain() : obj;
}
@@ -4416,13 +4423,13 @@ underscore-esm.js
- function mixin(obj) {
- each(functions(obj), function(name) {
+ function mixin(obj) {
+ each(functions(obj), function(name) {
var func = _$1[name] = obj[name];
- _$1.prototype[name] = function() {
- var args = [this._wrapped];
- push.apply(args, arguments);
- return chainResult(this, func.apply(_$1, args));
+ _$1.prototype[name] = function() {
+ var args = [this._wrapped];
+ push.apply(args, arguments);
+ return chainResult(this, func.apply(_$1, args));
};
});
return _$1;
@@ -4441,17 +4448,17 @@ underscore-esm.js
- each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
- var method = ArrayProto[name];
- _$1.prototype[name] = function() {
- var obj = this._wrapped;
+ each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
+ var method = ArrayProto[name];
+ _$1.prototype[name] = function() {
+ var obj = this._wrapped;
if (obj != null) {
- method.apply(obj, arguments);
- if ((name === 'shift' || name === 'splice') && obj.length === 0) {
+ method.apply(obj, arguments);
+ if ((name === 'shift' || name === 'splice') && obj.length === 0) {
delete obj[0];
}
}
- return chainResult(this, obj);
+ return chainResult(this, obj);
};
});
@@ -4468,12 +4475,12 @@ underscore-esm.js
- each(['concat', 'join', 'slice'], function(name) {
- var method = ArrayProto[name];
- _$1.prototype[name] = function() {
- var obj = this._wrapped;
- if (obj != null) obj = method.apply(obj, arguments);
- return chainResult(this, obj);
+ each(['concat', 'join', 'slice'], function(name) {
+ var method = ArrayProto[name];
+ _$1.prototype[name] = function() {
+ var obj = this._wrapped;
+ if (obj != null) obj = method.apply(obj, arguments);
+ return chainResult(this, obj);
};
});
@@ -4493,7 +4500,7 @@ underscore-esm.js
var allExports = {
__proto__: null,
- VERSION: VERSION,
+ VERSION: VERSION,
restArguments: restArguments,
isObject: isObject,
isNull: isNull,
@@ -4511,8 +4518,8 @@ underscore-esm.js
isArray: isArray,
isFunction: isFunction$1,
isArguments: isArguments$1,
- isFinite: isFinite$1,
- isNaN: isNaN$1,
+ isFinite: isFinite$1,
+ isNaN: isNaN$1,
isTypedArray: isTypedArray$1,
isEmpty: isEmpty,
isMatch: isMatch,
@@ -4638,7 +4645,7 @@ underscore-esm.js
range: range,
chunk: chunk,
mixin: mixin,
- 'default': _$1
+ 'default': _$1
};
@@ -4667,7 +4674,7 @@ underscore-esm.js
- var _ = mixin(allExports);
+ var _ = mixin(allExports);
@@ -4682,7 +4689,7 @@ underscore-esm.js
- _._ = _;
+ _._ = _;
@@ -4699,7 +4706,7 @@ underscore-esm.js
export default _;
-export { VERSION, after, every as all, allKeys, some as any, extendOwn as assign, before, bind, bindAll, chain, chunk, clone, map as collect, compact, compose, constant, contains, countBy, create, debounce, defaults, defer, delay, find as detect, difference, rest as drop, each, _escape as escape, every, extend, extendOwn, filter, find, findIndex, findKey, findLastIndex, findWhere, first, flatten, reduce as foldl, reduceRight as foldr, each as forEach, functions, get, groupBy, has, first as head, identity, contains as include, contains as includes, indexBy, indexOf, initial, reduce as inject, intersection, invert, invoke, isArguments$1 as isArguments, isArray, isArrayBuffer, isBoolean, isDataView$1 as isDataView, isDate, isElement, isEmpty, isEqual, isError, isFinite$1 as isFinite, isFunction$1 as isFunction, isMap, isMatch, isNaN$1 as isNaN, isNull, isNumber, isObject, isRegExp, isSet, isString, isSymbol, isTypedArray$1 as isTypedArray, isUndefined, isWeakMap, isWeakSet, iteratee, keys, last, lastIndexOf, map, mapObject, matcher, matcher as matches, max, memoize, functions as methods, min, mixin, negate, noop, now, object, omit, once, pairs, partial, partition, pick, pluck, property, propertyOf, random, range, reduce, reduceRight, reject, rest, restArguments, result, sample, filter as select, shuffle, size, some, sortBy, sortedIndex, rest as tail, first as take, tap, template, templateSettings, throttle, times, toArray, toPath$1 as toPath, unzip as transpose, _unescape as unescape, union, uniq, uniq as unique, uniqueId, unzip, values, where, without, wrap, zip };
+export { VERSION, after, every as all, allKeys, some as any, extendOwn as assign, before, bind, bindAll, chain, chunk, clone, map as collect, compact, compose, constant, contains, countBy, create, debounce, defaults, defer, delay, find as detect, difference, rest as drop, each, _escape as escape, every, extend, extendOwn, filter, find, findIndex, findKey, findLastIndex, findWhere, first, flatten, reduce as foldl, reduceRight as foldr, each as forEach, functions, get, groupBy, has, first as head, identity, contains as include, contains as includes, indexBy, indexOf, initial, reduce as inject, intersection, invert, invoke, isArguments$1 as isArguments, isArray, isArrayBuffer, isBoolean, isDataView$1 as isDataView, isDate, isElement, isEmpty, isEqual, isError, isFinite$1 as isFinite, isFunction$1 as isFunction, isMap, isMatch, isNaN$1 as isNaN, isNull, isNumber, isObject, isRegExp, isSet, isString, isSymbol, isTypedArray$1 as isTypedArray, isUndefined, isWeakMap, isWeakSet, iteratee, keys, last, lastIndexOf, map, mapObject, matcher, matcher as matches, max, memoize, functions as methods, min, mixin, negate, noop, now, object, omit, once, pairs, partial, partition, pick, pluck, property, propertyOf, random, range, reduce, reduceRight, reject, rest, restArguments, result, sample, filter as select, shuffle, size, some, sortBy, sortedIndex, rest as tail, first as take, tap, template, templateSettings, throttle, times, toArray, toPath$1 as toPath, unzip as transpose, _unescape as unescape, union, uniq, uniq as unique, uniqueId, unzip, values, where, without, wrap, zip };
diff --git a/index.html b/index.html
index 76d5feb5e..e2174607d 100644
--- a/index.html
+++ b/index.html
@@ -107,6 +107,13 @@
font-style: italic;
margin-left: 20px;
}
+ a.source {
+ font-variant: small-caps;
+ margin-left: 20px;
+ }
+ a.source + a.source {
+ margin-left: unset;
+ }
table, tr, td {
margin: 0; padding: 0;
}
@@ -252,6 +259,55 @@
width: 100%;
}
}
+
+ @media screen and (prefers-color-scheme: dark) {
+ body {
+ background: #111 !important;
+ color: #c6c6c6;
+ }
+ div#sidebar {
+ background: #111;
+ border-right: 1px solid #666;
+ box-shadow: 0 0 20px #555;
+ -webkit-box-shadow: 0 0 20px #555;
+ -moz-box-shadow: 0 0 20px #555;
+ }
+ a.toc_title,
+ a.toc_title:visited {
+ color: #f4f4f4;
+ }
+ a.toc_title:hover {
+ text-decoration: underline;
+ }
+ .toc_section li a {
+ text-decoration: none;
+ color: #f4f4f4;
+ }
+ img#logo {
+ filter: invert(1) hue-rotate(180deg) brightness(0.9);
+ }
+ div.warning {
+ color: #CC6060;
+ }
+ a,
+ a:visited {
+ color: #f4f4f4;
+ }
+ a:active,
+ a:hover {
+ color: #ffffff;
+ }
+ table .rule {
+ background: #777;
+ }
+ tt {
+ background: #444;
+ border: 1px solid #777;
+ }
+ pre {
+ border-left: 5px solid #aaa;
+ }
+ }
@@ -262,7 +318,7 @@
@@ -551,7 +608,7 @@
Underscore is an open-source component of DocumentCloud.
- v1.13.2 Downloads (Right-click, and use "Save As")
+ v1.13.7 Downloads (Right-click, and use "Save As")
@@ -595,32 +652,32 @@ v1.13.2 Downloads (Right-clic
- v1.13.2 CDN URLs (Use with <script src="..."></script>)
+ v1.13.7 CDN URLs (Use with <script src="..."></script>)
-
- https://cdn.jsdelivr.net/npm/underscore@1.13.2/underscore-umd-min.js
+ https://cdn.jsdelivr.net/npm/underscore@1.13.7/underscore-umd-min.js
-
- https://cdn.jsdelivr.net/npm/underscore@1.13.2/underscore-esm-min.js
+ https://cdn.jsdelivr.net/npm/underscore@1.13.7/underscore-esm-min.js
-
- https://unpkg.com/underscore@1.13.2/underscore-umd-min.js
+ https://unpkg.com/underscore@1.13.7/underscore-umd-min.js
-
- https://unpkg.com/underscore@1.13.2/underscore-esm-min.js
+ https://unpkg.com/underscore@1.13.7/underscore-esm-min.js
-
- https://pagecdn.io/lib/underscore/1.13.2/underscore-umd-min.js
+ https://pagecdn.io/lib/underscore/1.13.7/underscore-umd-min.js
-
- https://pagecdn.io/lib/underscore/1.13.2/underscore-esm-min.js
+ https://pagecdn.io/lib/underscore/1.13.7/underscore-esm-min.js
-
- https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.13.2/underscore-umd-min.js
+ https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.13.7/underscore-umd-min.js
-
- https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.13.2/underscore-esm-min.js
+ https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.13.7/underscore-esm-min.js
@@ -740,6 +797,7 @@ Collection Functions (Arrays or Objects)
each_.each(list, iteratee, [context])
Alias: forEach
+ source
Iterates over a list of elements, yielding each in turn to an
iteratee function.
@@ -768,6 +826,7 @@
Collection Functions (Arrays or Objects)
map_.map(list, iteratee, [context])
Alias: collect
+ source
Produces a new array of values by mapping each value in list
through a transformation function (iteratee).
@@ -786,6 +845,7 @@
Collection Functions (Arrays or Objects)
reduce_.reduce(list, iteratee, [memo], [context])
Aliases: inject, foldl
+ source
Also known as inject and foldl, reduce boils down a list of values into a single value.
Memo is the initial state of the reduction, and each successive step of it should be returned by
@@ -805,6 +865,7 @@
Collection Functions (Arrays or Objects)
reduceRight_.reduceRight(list, iteratee, [memo], [context])
Alias: foldr
+ source
The right-associative version of reduce. Foldr
is not as useful in JavaScript as it would be in a language with lazy
@@ -819,6 +880,7 @@
Collection Functions (Arrays or Objects)
find_.find(list, predicate, [context])
Alias: detect
+ source
Looks through each value in the list, returning the first one that
passes a truth test (predicate), or undefined if no value
@@ -836,6 +898,7 @@
Collection Functions (Arrays or Objects)
filter_.filter(list, predicate, [context])
Alias: select
+ source
Looks through each value in the list, returning an array of all
the values that pass a truth test (predicate).
@@ -849,6 +912,7 @@
Collection Functions (Arrays or Objects)
findWhere_.findWhere(list, properties)
+ source
Looks through the list and returns the first value that matches
all of the key-value pairs listed in properties.
@@ -867,6 +931,7 @@
Collection Functions (Arrays or Objects)
where_.where(list, properties)
+ source
Looks through each value in the list, returning an array of all
the values that matches the key-value pairs listed in properties.
@@ -879,6 +944,7 @@
Collection Functions (Arrays or Objects)
reject_.reject(list, predicate, [context])
+ source
Returns the values in list without the elements that the truth
test (predicate) passes. The opposite of filter.
@@ -893,6 +959,7 @@
Collection Functions (Arrays or Objects)
every_.every(list, [predicate], [context])
Alias: all
+ source
Returns true if all of the values in the list pass the
predicate truth test. Short-circuits and stops traversing the list
@@ -908,6 +975,7 @@
Collection Functions (Arrays or Objects)
some_.some(list, [predicate], [context])
Alias: any
+ source
Returns true if any of the values in the list pass the
predicate truth test. Short-circuits and stops traversing the list
@@ -923,6 +991,7 @@
Collection Functions (Arrays or Objects)
contains_.contains(list, value, [fromIndex])
Aliases: include, includes
+ source
Returns true if the value is present in the list.
Uses indexOf internally, if list is an Array.
@@ -935,6 +1004,7 @@
Collection Functions (Arrays or Objects)
invoke_.invoke(list, methodName, *arguments)
+ source
Calls the method named by methodName on each value in the list.
Any extra arguments passed to invoke will be forwarded on to the
@@ -947,6 +1017,7 @@
Collection Functions (Arrays or Objects)
pluck_.pluck(list, propertyName)
+ source
A convenient version of what is perhaps the most common use-case for
map: extracting a list of property values.
@@ -959,6 +1030,7 @@
Collection Functions (Arrays or Objects)
max_.max(list, [iteratee], [context])
+ source
Returns the maximum value in list. If an iteratee
function is provided, it will be used on each value to generate the
@@ -976,6 +1048,7 @@
Collection Functions (Arrays or Objects)
min_.min(list, [iteratee], [context])
+ source
Returns the minimum value in list. If an iteratee
function is provided, it will be used on each value to generate the
@@ -993,6 +1066,7 @@
Collection Functions (Arrays or Objects)
sortBy_.sortBy(list, iteratee, [context])
+ source
Returns a (stably) sorted copy of list, ranked in ascending
order by the results of running each value through iteratee.
@@ -1010,6 +1084,7 @@
Collection Functions (Arrays or Objects)
groupBy_.groupBy(list, iteratee, [context])
+ source
Splits a collection into sets, grouped by the result of running each
value through iteratee. If iteratee is a string instead of
@@ -1026,6 +1101,7 @@
Collection Functions (Arrays or Objects)
indexBy_.indexBy(list, iteratee, [context])
+ source
Given a list, and an iteratee function
that returns a key for each element in the list (or a property name),
@@ -1045,6 +1121,7 @@
Collection Functions (Arrays or Objects)
countBy_.countBy(list, iteratee, [context])
+ source
Sorts a list into groups and returns a count for the number of objects
in each group.
@@ -1060,6 +1137,7 @@
Collection Functions (Arrays or Objects)
shuffle_.shuffle(list)
+ source
Returns a shuffled copy of the list, using a version of the
Fisher-Yates shuffle.
@@ -1071,6 +1149,7 @@
Collection Functions (Arrays or Objects)
sample_.sample(list, [n])
+ source
Produce a random sample from the list. Pass a number to
return n random elements from the list. Otherwise a single random
@@ -1086,6 +1165,7 @@
Collection Functions (Arrays or Objects)
toArray_.toArray(list)
+ source
Creates a real Array from the list (anything that can be
iterated over). Useful for transmuting the arguments object.
@@ -1097,6 +1177,7 @@
Collection Functions (Arrays or Objects)
size_.size(list)
+ source
Return the number of values in the list.
@@ -1110,6 +1191,7 @@ Collection Functions (Arrays or Objects)
partition_.partition(list, predicate)
+ source
Split list into two arrays: one whose elements all satisfy
predicate and one whose elements all do not satisfy predicate.
@@ -1123,6 +1205,7 @@
Collection Functions (Arrays or Objects)
compact_.compact(list)
+ source
Returns a copy of the list with all falsy values removed.
In JavaScript, false, null, 0, "",
@@ -1145,6 +1228,7 @@
Array Functions
first_.first(array, [n])
Aliases: head, take
+ source
Returns the first element of an array. Passing n will
return the first n elements of the array.
@@ -1156,6 +1240,7 @@
Array Functions
initial_.initial(array, [n])
+ source
Returns everything but the last entry of the array. Especially useful on
the arguments object. Pass n to exclude the last n elements
@@ -1168,6 +1253,7 @@
Array Functions
last_.last(array, [n])
+ source
Returns the last element of an array. Passing n will return
the last n elements of the array.
@@ -1180,6 +1266,7 @@
Array Functions
rest_.rest(array, [index])
Aliases: tail, drop
+ source
Returns the rest of the elements in an array. Pass an index
to return the values of the array from that index onward.
@@ -1191,6 +1278,7 @@
Array Functions
flatten_.flatten(array, [depth])
+ source
Flattens a nested array. If you pass true or 1
as the depth, the array will only be flattened a single level.
@@ -1212,6 +1300,7 @@
Array Functions
without_.without(array, *values)
+ source
Returns a copy of the array with all instances of the values
removed.
@@ -1223,6 +1312,7 @@
Array Functions
union_.union(*arrays)
+ source
Computes the union of the passed-in arrays: the list of unique items,
in order, that are present in one or more of the arrays.
@@ -1234,6 +1324,7 @@
Array Functions
intersection_.intersection(*arrays)
+ source
Computes the list of values that are the intersection of all the arrays.
Each value in the result is present in each of the arrays.
@@ -1245,6 +1336,7 @@
Array Functions
difference_.difference(array, *others)
+ source
Similar to without, but returns the values from array that
are not present in the other arrays.
@@ -1257,6 +1349,7 @@
Array Functions
uniq_.uniq(array, [isSorted], [iteratee])
Alias: unique
+ source
Produces a duplicate-free version of the array, using === to test
object equality. In particular only the first occurrence of each value is kept.
@@ -1272,6 +1365,7 @@
Array Functions
zip_.zip(*arrays)
+ source
Merges together the values of each of the arrays with the
values at the corresponding position. Useful when you have separate
@@ -1286,6 +1380,7 @@
Array Functions
unzip_.unzip(array)
Alias: transpose
+ source
The opposite of zip. Given an array of
arrays, returns a series of new arrays, the first of which contains all
@@ -1300,6 +1395,7 @@
Array Functions
object_.object(list, [values])
+ source
Converts arrays into objects. Pass either a single list of
[key, value] pairs, or a list of keys, and a list of values. Passing
@@ -1316,6 +1412,7 @@
Array Functions
chunk_.chunk(array, length)
+ source
Chunks an array into multiple arrays, each containing length
or fewer items.
@@ -1327,6 +1424,7 @@
Array Functions
indexOf_.indexOf(array, value, [isSorted])
+ source
Returns the index at which value can be found in the array,
or -1 if value is not present in the array. If you're working with a
@@ -1344,6 +1442,7 @@
Array Functions
lastIndexOf_.lastIndexOf(array, value, [fromIndex])
+ source
Returns the index of the last occurrence of value in the array,
or -1 if value is not present. Pass fromIndex to start your search at a
@@ -1356,6 +1455,7 @@
Array Functions
sortedIndex_.sortedIndex(array, value, [iteratee], [context])
+ source
Uses a binary search to determine the smallest index at which the value
should be inserted into the array in order to maintain the array's
@@ -1376,6 +1476,7 @@
Array Functions
findIndex_.findIndex(array, predicate, [context])
+ source
Similar to _.indexOf, returns the first index
where the predicate truth test passes; otherwise returns -1.
@@ -1389,6 +1490,7 @@
Array Functions
findLastIndex_.findLastIndex(array, predicate, [context])
+ source
Like _.findIndex but iterates the array in reverse,
returning the index closest to the end where the predicate truth test
@@ -1407,15 +1509,14 @@
Array Functions
range_.range([start], stop, [step])
+ source
A function to create flexibly-numbered lists of integers, handy for
each and map loops. start, if omitted,
- defaults to 0; step defaults to 1. Returns a list
+ defaults to 0; step defaults to 1 if start
+ is before stop, otherwise -1. Returns a list
of integers from start (inclusive) to stop (exclusive),
- incremented (or decremented) by step. Note that ranges that
- stop before they start are considered to be zero-length
- instead of negative â if you'd like a negative range, use a negative
- step.
+ incremented (or decremented) by step.
_.range(10);
@@ -1434,6 +1535,7 @@ Function (uh, ahem) Functions
bind_.bind(function, object, *arguments)
+ source
Bind a function to an object, meaning that whenever
the function is called, the value of this will be the object.
@@ -1450,6 +1552,7 @@
Function (uh, ahem) Functions
bindAll_.bindAll(object, *methodNames)
+ source
Binds a number of methods on the object, specified by
methodNames, to be run in the context of that object whenever they
@@ -1470,6 +1573,7 @@
Function (uh, ahem) Functions
partial_.partial(function, *arguments)
+ source
Partially apply a function by filling in any number of its
arguments, without changing its dynamic this
@@ -1494,6 +1598,7 @@
Function (uh, ahem) Functions
memoize_.memoize(function, [hashFunction])
+ source
Memoizes a given function by caching the computed result. Useful
for speeding up slow-running computations. If passed an optional
@@ -1511,6 +1616,7 @@
Function (uh, ahem) Functions
delay_.delay(function, wait, *arguments)
+ source
Much like setTimeout, invokes function after wait
milliseconds. If you pass the optional arguments, they will be
@@ -1524,6 +1630,7 @@
Function (uh, ahem) Functions
defer_.defer(function, *arguments)
+ source
Defers invoking the function until the current call stack has cleared,
similar to using setTimeout with a delay of 0. Useful for performing
@@ -1538,6 +1645,7 @@
Function (uh, ahem) Functions
throttle_.throttle(function, wait, [options])
+ source
Creates and returns a new, throttled version of the passed function,
that, when invoked repeatedly, will only actually call the original function
@@ -1564,6 +1672,7 @@
Function (uh, ahem) Functions
debounce_.debounce(function, wait, [immediate])
+ source
Creates and returns a new debounced version of the passed function which
will postpone its execution until after
@@ -1596,6 +1705,7 @@
Function (uh, ahem) Functions
once_.once(function)
+ source
Creates a version of the function that can only be called one time.
Repeated calls to the modified function will have no effect, returning
@@ -1611,6 +1721,7 @@
Function (uh, ahem) Functions
after_.after(count, function)
+ source
Creates a wrapper of function that does nothing at first. From
the count-th call onwards, it starts actually calling
@@ -1628,6 +1739,7 @@
Function (uh, ahem) Functions
before_.before(count, function)
+ source
Creates a wrapper of function that memoizes its return value.
From the count-th call onwards, the memoized result of the last
@@ -1645,6 +1757,7 @@
Function (uh, ahem) Functions
wrap_.wrap(function, wrapper)
+ source
Wraps the first function inside of the wrapper function,
passing it as the first argument. This allows the wrapper to
@@ -1662,6 +1775,7 @@
Function (uh, ahem) Functions
negate_.negate(predicate)
+ source
Returns a new negated version of the predicate function.
@@ -1673,6 +1787,7 @@ Function (uh, ahem) Functions
compose_.compose(*functions)
+ source
Returns the composition of a list of functions, where each function
consumes the return value of the function that follows. In math terms,
@@ -1689,6 +1804,7 @@
Function (uh, ahem) Functions
restArguments_.restArguments(function, [startIndex])
+ source
Returns a version of the function that, when called, receives all
arguments from and beyond startIndex collected into a single array.
@@ -1709,6 +1825,7 @@
Object Functions
keys_.keys(object)
+ source
Retrieve all the names of the object's own enumerable properties.
@@ -1719,6 +1836,7 @@ Object Functions
allKeys_.allKeys(object)
+ source
Retrieve all the names of object's own and inherited properties.
@@ -1733,6 +1851,7 @@ Object Functions
values_.values(object)
+ source
Return all of the values of the object's own properties.
@@ -1743,6 +1862,7 @@ Object Functions
mapObject_.mapObject(object, iteratee, [context])
+ source
Like map, but for objects. Transform the value
of each property in turn.
@@ -1756,6 +1876,7 @@
Object Functions
pairs_.pairs(object)
+ source
Convert an object into a list of [key, value] pairs. The opposite
of object.
@@ -1767,6 +1888,7 @@
Object Functions
invert_.invert(object)
+ source
Returns a copy of the object where the keys have become the values
and the values the keys. For this to work, all of your object's values
@@ -1779,6 +1901,7 @@
Object Functions
create_.create(prototype, props)
+ source
Creates a new object with the given prototype, optionally attaching
props as own properties. Basically, Object.create,
@@ -1791,6 +1914,7 @@
Object Functions
functions_.functions(object)
Alias: methods
+ source
Returns a sorted list of the names of every method in an object —
that is to say, the name of every function property of the object.
@@ -1802,6 +1926,7 @@
Object Functions
findKey_.findKey(object, predicate, [context])
+ source
Similar to _.findIndex but for keys in objects.
Returns the key where the predicate truth test
@@ -1812,6 +1937,7 @@
Object Functions
extend_.extend(destination, *sources)
+ source
Shallowly copy all of the properties in the source objects over to the
destination object, and return the destination object.
@@ -1827,6 +1953,7 @@
Object Functions
extendOwn_.extendOwn(destination, *sources)
Alias: assign
+ source
Like extend, but only copies own properties over to the
destination object.
@@ -1834,6 +1961,7 @@
Object Functions
pick_.pick(object, *keys)
+ source
Return a copy of the object, filtered to only have values for
the allowed keys (or array of valid keys). Alternatively
@@ -1850,6 +1978,7 @@
Object Functions
omit_.omit(object, *keys)
+ source
Return a copy of the object, filtered to omit the disallowed
keys (or array of keys). Alternatively accepts a predicate
@@ -1866,6 +1995,7 @@
Object Functions
defaults_.defaults(object, *defaults)
+ source
Returns object after filling in its undefined properties
with the first value present in the following list of defaults objects.
@@ -1878,6 +2008,7 @@
Object Functions
clone_.clone(object)
+ source
Create a shallow-copied clone of the provided plain object.
Any nested objects or arrays will be copied by reference, not duplicated.
@@ -1889,6 +2020,7 @@
Object Functions
tap_.tap(object, interceptor)
+ source
Invokes interceptor with the object, and then returns object.
The primary purpose of this method is to "tap into" a method chain, in order to perform operations on intermediate results within the chain.
@@ -1904,7 +2036,9 @@
Object Functions
- toPath_.toPath(path)
+ toPath_.toPath(path)
+ source
+
Ensures that path is an array. If path is a string, it is
wrapped in a single-element array; if it is an array already, it is
returned unmodified.
@@ -1938,7 +2072,9 @@
Object Functions
- get_.get(object, path, [default])
+ get_.get(object, path, [default])
+ source
+
Returns the specified property of object. path may be
specified as a simple key, or as an array of object keys or array
indexes, for deep property fetching. If the property does not exist or
@@ -1955,6 +2091,7 @@
Object Functions
has_.has(object, key)
+ source
Does the object contain the given key? Identical to
object.hasOwnProperty(key), but uses a safe reference to the
@@ -1969,6 +2106,7 @@
Object Functions
property_.property(path)
+ source
Returns a function that will return the specified property of any
passed-in object. path may be specified as a simple key, or
@@ -1987,6 +2125,7 @@
Object Functions
propertyOf_.propertyOf(object)
+ source
Inverse of _.property. Takes an object and returns a function
which will return the value of a provided property.
@@ -1999,6 +2138,7 @@
Object Functions
matcher_.matcher(attrs)
Alias: matches
+ source
Returns a predicate function that will tell you if a passed in object
contains all of the key/value properties present in attrs.
@@ -2009,6 +2149,7 @@
Object Functions
isEqual_.isEqual(object, other)
+ source
Performs an optimized deep comparison between the two objects, to determine
if they should be considered equal.
@@ -2024,6 +2165,7 @@
Object Functions
isMatch_.isMatch(object, properties)
+ source
Tells you if the keys and values in properties are contained
in object.
@@ -2036,6 +2178,7 @@
Object Functions
isEmpty_.isEmpty(collection)
+ source
Returns true if collection has no elements. For strings
and array-like objects _.isEmpty checks if the length property
@@ -2052,6 +2195,7 @@
Object Functions
isElement_.isElement(object)
+ source
Returns true if object is a DOM element.
@@ -2062,6 +2206,7 @@ Object Functions
isArray_.isArray(object)
+ source
Returns true if object is an Array.
@@ -2074,6 +2219,7 @@ Object Functions
isObject_.isObject(value)
+ source
Returns true if value is an Object. Note that JavaScript
arrays and functions are objects, while (normal) strings and numbers are not.
@@ -2087,6 +2233,7 @@
Object Functions
isArguments_.isArguments(object)
+ source
Returns true if object is an Arguments object.
@@ -2099,6 +2246,7 @@ Object Functions
isFunction_.isFunction(object)
+ source
Returns true if object is a Function.
@@ -2109,6 +2257,7 @@ Object Functions
isString_.isString(object)
+ source
Returns true if object is a String.
@@ -2119,6 +2268,7 @@ Object Functions
isNumber_.isNumber(object)
+ source
Returns true if object is a Number (including NaN).
@@ -2129,6 +2279,7 @@ Object Functions
isFinite_.isFinite(object)
+ source
Returns true if object is a finite Number.
@@ -2142,6 +2293,7 @@ Object Functions
isBoolean_.isBoolean(object)
+ source
Returns true if object is either true or false.
@@ -2152,6 +2304,7 @@ Object Functions
isDate_.isDate(object)
+ source
Returns true if object is a Date.
@@ -2162,6 +2315,7 @@ Object Functions
isRegExp_.isRegExp(object)
+ source
Returns true if object is a RegExp.
@@ -2172,6 +2326,7 @@ Object Functions
isError_.isError(object)
+ source
Returns true if object inherits from an Error.
@@ -2186,6 +2341,7 @@ Object Functions
isSymbol_.isSymbol(object)
+ source
Returns true if object is a Symbol.
@@ -2196,6 +2352,7 @@ Object Functions
isMap_.isMap(object)
+ source
Returns true if object is a Map.
@@ -2206,6 +2363,7 @@ Object Functions
isWeakMap_.isWeakMap(object)
+ source
Returns true if object is a WeakMap.
@@ -2216,6 +2374,7 @@ Object Functions
isSet_.isSet(object)
+ source
Returns true if object is a Set.
@@ -2226,6 +2385,7 @@ Object Functions
isWeakSet_.isWeakSet(object)
+ source
Returns true if object is a WeakSet.
@@ -2236,6 +2396,7 @@ Object Functions
isArrayBuffer_.isArrayBuffer(object)
+ source
Returns true if object is an ArrayBuffer.
@@ -2246,6 +2407,7 @@ Object Functions
isDataView_.isDataView(object)
+ source
Returns true if object is a DataView.
@@ -2256,6 +2418,7 @@ Object Functions
isTypedArray_.isTypedArray(object)
+ source
Returns true if object is a TypedArray.
@@ -2266,6 +2429,7 @@ Object Functions
isNaN_.isNaN(object)
+ source
Returns true if object is NaN.
Note: this is not
the same as the native isNaN function, which will also return
@@ -2282,6 +2446,7 @@
Object Functions
isNull_.isNull(object)
+ source
Returns true if the value of object is null.
@@ -2294,6 +2459,7 @@ Object Functions
isUndefined_.isUndefined(value)
+ source
Returns true if value is undefined.
@@ -2306,6 +2472,7 @@ Utility Functions
noConflict_.noConflict()
+ source
Give control of the global _ variable back to its previous
owner. Returns a reference to the Underscore object.
@@ -2319,6 +2486,7 @@
Utility Functions
identity_.identity(value)
+ source
Returns the same value that is used as the argument. In math:
f(x) = x
@@ -2333,6 +2501,7 @@
Utility Functions
constant_.constant(value)
+ source
Creates a function that returns the same value that is used as the
argument of _.constant.
@@ -2344,6 +2513,7 @@
Utility Functions
noop_.noop()
+ source
Returns undefined irrespective of the arguments passed to it.
Useful as the default for optional callback arguments.
@@ -2354,6 +2524,7 @@
Utility Functions
times_.times(n, iteratee, [context])
+ source
Invokes the given iteratee function n times. Each invocation of
iteratee is called with an index argument.
@@ -2364,6 +2535,7 @@
Utility Functions
random_.random(min, max)
+ source
Returns a random integer between min and max, inclusive.
If you only pass one argument, it will return a number between 0
@@ -2375,6 +2547,7 @@
Utility Functions
mixin_.mixin(object)
+ source
Allows you to extend Underscore with your own utility functions. Pass
a hash of {name: function} definitions to have your functions
@@ -2392,6 +2565,7 @@
Utility Functions
iteratee_.iteratee(value, [context])
+ source
Generates a callback that can be applied to each element in
a collection. _.iteratee supports a number of shorthand
@@ -2438,6 +2612,7 @@
Utility Functions
};
uniqueId_.uniqueId([prefix])
+ source
Generate a globally-unique id for client-side models or DOM elements
that need one. If prefix is passed, the id will be appended to it.
@@ -2448,6 +2623,7 @@
Utility Functions
escape_.escape(string)
+ source
Escapes a string for insertion into HTML, replacing
&, <, >, ", `, and ' characters.
@@ -2458,6 +2634,7 @@
Utility Functions
unescape_.unescape(string)
+ source
The opposite of escape, replaces
&, <, >,
@@ -2470,6 +2647,7 @@
Utility Functions
result_.result(object, property, [defaultValue])
+ source
If the value of the named property is a function then invoke it
with the object as context; otherwise, return it. If a default value
@@ -2488,6 +2666,7 @@
Utility Functions
now_.now()
+ source
Returns an integer timestamp for the current time, using the fastest
method available in the runtime. Useful for implementing timing/animation
@@ -2500,6 +2679,7 @@
Utility Functions
template_.template(templateString, [settings])
+ source
Compiles JavaScript templates into functions that can be evaluated
for rendering. Useful for rendering complicated bits of HTML from JSON
@@ -2578,6 +2758,14 @@
Utility Functions
JST.project = <%= _.template(jstText).source %>;
</script>
+
+ VERSION
+
+ It is possible to get the current Underscore version via
+ _.VERSION
+ .
+
_.VERSION => 1.13.7
+
Object-Oriented Style
@@ -2585,6 +2773,8 @@ Object-Oriented Style
You can use Underscore in either an object-oriented or a functional style,
depending on your preference. The following two lines of code are
identical ways to double a list of numbers.
+ source,
+ source
@@ -2630,6 +2820,7 @@ Chaining
chain_.chain(obj)
+ source
Returns a wrapped object. Calling methods on this object will continue
to return wrapped objects until value is called.
@@ -2646,6 +2837,7 @@
Chaining
value_.chain(obj).value()
+ source
Extracts the value of a wrapped object.
@@ -2798,6 +2990,77 @@ Notes
Change Log
+
+ -
+ Fixes a bug where Underscore might throw an error on load if the
+ executing environment overrides the native DataView.
+
+ -
+ Adds a direct link to the corresponding source code for each
+ function in the documentation.
+
+ -
+ Clarifies the documentation for the step argument of
+ the range function.
+
+ -
+ Adds dark mode support to the home page.
+
+ -
+ Other infrastructural improvements to funding, testing and building.
+
+
+
+
+
+ 1.13.6 — September 24, 2022 — Diff — Docs
+ Hotfix for version 1.13.5 to remove a postinstall script from
+ the package.json, which unexpectedly broke many people's builds.
+
+
+
+ 1.13.5 — September 23, 2022 — Diff — Docs
+
+ -
+ Adds a module sub-entry to the package.json’s exports.require condition. When a bundling tool, such as Rollup with recent versions of @rollup/plugin-node-resolve, takes the exports map very literally, this should prevent situations in which the final bundle includes multiple copies of Underscore in different module formats.
+
+ -
+ Updates to the testing infrastructure and development dependencies.
+
+ -
+ No code changes.
+
+
+
+
+
+ 1.13.4 — June 2, 2022 — Diff — Docs
+
+ -
+ Fixes a compatibility issue with WebPack module federation.
+
+ -
+ Documentation improvements.
+
+
+
+
+
+ 1.13.3 — April 23, 2022 — Diff — Docs
+
+ -
+ Fixes a compatibility issue with ExtendScript.
+
+ -
+ Various improvements to testing and continuous integration,
+ including the addition of security scanning and a reduced carbon
+ footprint.
+
+
+
+
1.13.2 — December 16, 2021 — Diff — Docs
@@ -4152,6 +4415,5 @@ Change Log
}
})
-