From 72bd84ff81ec6faa478bdde9aed1d22e8b915f93 Mon Sep 17 00:00:00 2001
From: Paul Falgout
Date: Sun, 6 Mar 2016 02:53:51 -0600
Subject: [PATCH 001/253] Allow a specified depth for flatten
Per a new TC39 proposal http://bterlson.github.io/proposal-flatMap/#sec-Array.prototype.flatten they're suggesting a depth argument.
This was fairly trivial to implement without breaking the current functionality.
Thoughts?
---
test/arrays.js | 2 ++
underscore.js | 17 +++++++++--------
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/test/arrays.js b/test/arrays.js
index 748edea4f..88029a0ad 100644
--- a/test/arrays.js
+++ b/test/arrays.js
@@ -90,6 +90,8 @@
assert.deepEqual(result, [1, 2, 3, 4], 'works on an arguments object');
list = [[1], [2], [3], [[4]]];
assert.deepEqual(_.flatten(list, true), [1, 2, 3, [4]], 'can shallowly flatten arrays containing only other arrays');
+ list = [1, [2], [[3]], [[[4]]]];
+ assert.deepEqual(_.flatten(list, 2), [1, 2, 3, [4]], 'can flatten arrays to a given depth');
assert.equal(_.flatten([_.range(10), _.range(10), 5, 1, 3], true).length, 23, 'can flatten medium length arrays');
assert.equal(_.flatten([_.range(10), _.range(10), 5, 1, 3]).length, 23, 'can shallowly flatten medium length arrays');
diff --git a/underscore.js b/underscore.js
index fc9036322..f3ceb1875 100644
--- a/underscore.js
+++ b/underscore.js
@@ -499,19 +499,19 @@
};
// Internal implementation of a recursive `flatten` function.
- var flatten = function(input, shallow, strict, output) {
+ var flatten = function(input, depth, strict, output) {
output = output || [];
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))) {
- // Flatten current level of array or arguments object.
- if (shallow) {
+ if (depth > 1) {
+ flatten(value, depth - 1, strict, output);
+ idx = output.length;
+ } else {
+ // Flatten current level of array or arguments object.
var j = 0, len = value.length;
while (j < len) output[idx++] = value[j++];
- } else {
- flatten(value, shallow, strict, output);
- idx = output.length;
}
} else if (!strict) {
output[idx++] = value;
@@ -521,8 +521,9 @@
};
// Flatten out an array, either recursively (by default), or just one level.
- _.flatten = function(array, shallow) {
- return flatten(array, shallow, false);
+ _.flatten = function(array, depth) {
+ if (!depth) depth = Infinity;
+ return flatten(array, depth, false);
};
// Return a version of the array that does not contain the specified value(s).
From 71536037a6b4f7e7a4b142f130f341278cc752ee Mon Sep 17 00:00:00 2001
From: Paul Falgout
Date: Mon, 7 Mar 2016 16:25:58 -0600
Subject: [PATCH 002/253] Account for 0 and negative depths for _.flatten
---
test/arrays.js | 2 ++
underscore.js | 6 +++++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/test/arrays.js b/test/arrays.js
index 88029a0ad..bdcdb539d 100644
--- a/test/arrays.js
+++ b/test/arrays.js
@@ -92,6 +92,8 @@
assert.deepEqual(_.flatten(list, true), [1, 2, 3, [4]], 'can shallowly flatten arrays containing only other arrays');
list = [1, [2], [[3]], [[[4]]]];
assert.deepEqual(_.flatten(list, 2), [1, 2, 3, [4]], 'can flatten arrays to a given depth');
+ assert.deepEqual(_.flatten(list, 0), list, 'can flatten arrays to depth of 0');
+ assert.deepEqual(_.flatten(list, -1), list, 'can flatten arrays to depth of -1');
assert.equal(_.flatten([_.range(10), _.range(10), 5, 1, 3], true).length, 23, 'can flatten medium length arrays');
assert.equal(_.flatten([_.range(10), _.range(10), 5, 1, 3]).length, 23, 'can shallowly flatten medium length arrays');
diff --git a/underscore.js b/underscore.js
index f3ceb1875..5a66dae88 100644
--- a/underscore.js
+++ b/underscore.js
@@ -522,7 +522,11 @@
// Flatten out an array, either recursively (by default), or just one level.
_.flatten = function(array, depth) {
- if (!depth) depth = Infinity;
+ if (!depth && depth !== 0) {
+ depth = Infinity;
+ } else if (depth <= 0) {
+ return _.clone(array);
+ }
return flatten(array, depth, false);
};
From 9f8bd778fb2a19002c42cc781cff9c73dc38cc1b Mon Sep 17 00:00:00 2001
From: maartenbreddels
Date: Thu, 17 Aug 2017 15:29:27 +0200
Subject: [PATCH 003/253] unittests for isEqual for typed arrays, some of which
pass accidently
---
test/objects.js | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/test/objects.js b/test/objects.js
index 1abdce21f..df9c0012c 100644
--- a/test/objects.js
+++ b/test/objects.js
@@ -578,6 +578,27 @@
var sameStringSymbol = Symbol('x');
assert.strictEqual(_.isEqual(symbol, sameStringSymbol), false, 'Different symbols of same string are not equal');
}
+
+ // typed arrays
+ var u8 = new Uint8Array([1,2]);
+ var u8b = new Uint8Array([1,2]);
+ var i8 = new Int8Array([1,2]);
+ var u16 = new Uint16Array([1,2]);
+ var u16one = new Uint16Array([3]);
+ b = new Uint8Array([5,6,10]);
+
+ assert.ok(_.isEqual(u8, u8b), 'Identical typed array data are equal');
+ assert.ok(_.isEqual(new DataView(u8.buffer), new DataView(u8b.buffer)), 'Identical DataViews are equal');
+ assert.ok(_.isEqual(u8, i8), 'Different types of typed arrays with the same byte data are equal');
+ // same values, but different byte values
+ assert.notOk(_.isEqual(u8, u16), 'Typed arrays with different types and different byte length are not equal');
+ assert.notOk(_.isEqual(u8, u16one), 'Typed arrays with different types, same byte length but different byte data are not equal');
+ assert.notOk(_.isEqual(new DataView(u8.buffer), new DataView(u16.buffer)), 'Different DataViews with different length are not equal');
+ assert.notOk(_.isEqual(new DataView(u8.buffer), new DataView(u16one.buffer)), 'Different DataViews with different byte data are not equal');
+
+
+ //assert.ok(_.isEqual(new DataView(u8.buffer)), new DataView(u8b.buffer))
+ //assert.notOk(_.isEqual(new DataView((new Uint8Array([1,2])).buffer), new DataView((new Uint8Array([5,6,10])).buffer));
});
QUnit.test('isEmpty', function(assert) {
From d0976c45a19cd7ff5d98e5afe9b4b3d54f7bbb64 Mon Sep 17 00:00:00 2001
From: maartenbreddels
Date: Thu, 17 Aug 2017 15:29:53 +0200
Subject: [PATCH 004/253] fixes jashkenas/underscore#2692: isEquals for typed
arrays by doing byte checks
---
underscore.js | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/underscore.js b/underscore.js
index ca1cdd332..c3dfdc534 100644
--- a/underscore.js
+++ b/underscore.js
@@ -1200,10 +1200,29 @@
// Unwrap any wrapped objects.
if (a instanceof _) a = a._wrapped;
if (b instanceof _) b = b._wrapped;
+ // typed arrays are compared by byte content, try to get a DataView
+ try {
+ a = new DataView(a.buffer)
+ } catch(ee) {
+ }
+ try {
+ b = new DataView(b.buffer)
+ } catch(err) {
+ }
// Compare `[[Class]]` names.
var className = toString.call(a);
if (className !== toString.call(b)) return false;
switch (className) {
+ // typed arrays we check by value
+ case '[object DataView]':
+ if(a.byteLength !== b.byteLength) {
+ return false
+ }
+ for(var i = 0; i < a.byteLength; i++) {
+ if(a.getUint8(i) != b.getUint8(i)) {
+ return false
+ }
+ }
// Strings, numbers, regular expressions, dates, and booleans are compared by value.
case '[object RegExp]':
// RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')
From ad6ef9e725efb81a1ad3e5890782eab9e9fdd3f5 Mon Sep 17 00:00:00 2001
From: maartenbreddels
Date: Thu, 17 Aug 2017 16:31:26 +0200
Subject: [PATCH 005/253] support for ArrayBuffer and compatible with lodash
---
test/objects.js | 9 +++++++--
underscore.js | 16 +++++++++-------
2 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/test/objects.js b/test/objects.js
index df9c0012c..64cffa140 100644
--- a/test/objects.js
+++ b/test/objects.js
@@ -588,13 +588,18 @@
b = new Uint8Array([5,6,10]);
assert.ok(_.isEqual(u8, u8b), 'Identical typed array data are equal');
+ assert.ok(_.isEqual(u8.buffer, u8b.buffer), 'Identical ArrayBuffers are equal');
assert.ok(_.isEqual(new DataView(u8.buffer), new DataView(u8b.buffer)), 'Identical DataViews are equal');
- assert.ok(_.isEqual(u8, i8), 'Different types of typed arrays with the same byte data are equal');
- // same values, but different byte values
+ assert.ok(_.isEqual(new DataView(u8.buffer), new DataView(i8.buffer)), 'Identical DataViews of different typed arrays are equal');
+ assert.ok(_.isEqual(u8.buffer, i8.buffer), 'Identical ArrayBuffers of different typed arrays are equal');
+
+ assert.notOk(_.isEqual(u8, i8), 'Different types of typed arrays with the same byte data are not equal');
assert.notOk(_.isEqual(u8, u16), 'Typed arrays with different types and different byte length are not equal');
assert.notOk(_.isEqual(u8, u16one), 'Typed arrays with different types, same byte length but different byte data are not equal');
assert.notOk(_.isEqual(new DataView(u8.buffer), new DataView(u16.buffer)), 'Different DataViews with different length are not equal');
assert.notOk(_.isEqual(new DataView(u8.buffer), new DataView(u16one.buffer)), 'Different DataViews with different byte data are not equal');
+ assert.notOk(_.isEqual(u8.buffer, u16.buffer), 'Different ArrayBuffers with different length are not equal');
+ assert.notOk(_.isEqual(u8.buffer, u16one.buffer), 'Different ArrayBuffers with different byte data are not equal');
//assert.ok(_.isEqual(new DataView(u8.buffer)), new DataView(u8b.buffer))
diff --git a/underscore.js b/underscore.js
index c3dfdc534..a2e20f2df 100644
--- a/underscore.js
+++ b/underscore.js
@@ -1201,19 +1201,21 @@
if (a instanceof _) a = a._wrapped;
if (b instanceof _) b = b._wrapped;
// typed arrays are compared by byte content, try to get a DataView
+ // Compare `[[Class]]` names.
+ var className = toString.call(a);
+ if (className !== toString.call(b)) return false;
+
+ // If a and b are of the same typed array, we compare them as DataView
try {
a = new DataView(a.buffer)
- } catch(ee) {
- }
- try {
b = new DataView(b.buffer)
} catch(err) {
}
- // Compare `[[Class]]` names.
- var className = toString.call(a);
- if (className !== toString.call(b)) return false;
+
switch (className) {
- // typed arrays we check by value
+ // DataView we check by value
+ case '[object ArrayBuffer]':
+ return deepEq(new DataView(a), new DataView(b), aStack, bStack)
case '[object DataView]':
if(a.byteLength !== b.byteLength) {
return false
From ba72109174f97060acebc0ee073cc2eaf06f6f8d Mon Sep 17 00:00:00 2001
From: maartenbreddels
Date: Thu, 17 Aug 2017 16:32:25 +0200
Subject: [PATCH 006/253] cleanup
---
test/objects.js | 1 -
1 file changed, 1 deletion(-)
diff --git a/test/objects.js b/test/objects.js
index 64cffa140..59173abd4 100644
--- a/test/objects.js
+++ b/test/objects.js
@@ -585,7 +585,6 @@
var i8 = new Int8Array([1,2]);
var u16 = new Uint16Array([1,2]);
var u16one = new Uint16Array([3]);
- b = new Uint8Array([5,6,10]);
assert.ok(_.isEqual(u8, u8b), 'Identical typed array data are equal');
assert.ok(_.isEqual(u8.buffer, u8b.buffer), 'Identical ArrayBuffers are equal');
From d316bf4442357fe66e190145f328f1e34da282a6 Mon Sep 17 00:00:00 2001
From: maartenbreddels
Date: Thu, 17 Aug 2017 16:33:37 +0200
Subject: [PATCH 007/253] return true (sooner)
---
underscore.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/underscore.js b/underscore.js
index a2e20f2df..8e51ff4fc 100644
--- a/underscore.js
+++ b/underscore.js
@@ -1225,6 +1225,7 @@
return false
}
}
+ return true;
// Strings, numbers, regular expressions, dates, and booleans are compared by value.
case '[object RegExp]':
// RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')
From a8b0462ac36554306827dd1b190d669ef000938d Mon Sep 17 00:00:00 2001
From: maartenbreddels
Date: Fri, 18 Aug 2017 20:22:28 +0200
Subject: [PATCH 008/253] break isEquals by feeding an object with a .buffer
property
---
test/objects.js | 2 ++
1 file changed, 2 insertions(+)
diff --git a/test/objects.js b/test/objects.js
index 59173abd4..a7370d276 100644
--- a/test/objects.js
+++ b/test/objects.js
@@ -592,6 +592,8 @@
assert.ok(_.isEqual(new DataView(u8.buffer), new DataView(i8.buffer)), 'Identical DataViews of different typed arrays are equal');
assert.ok(_.isEqual(u8.buffer, i8.buffer), 'Identical ArrayBuffers of different typed arrays are equal');
+ assert.notOk(_.isEqual({a:1, 'buffer':u8.buffer}, {'a':2, buffer:u8b.buffer}), 'Unequal objects with similar buffer properties are not equals');
+
assert.notOk(_.isEqual(u8, i8), 'Different types of typed arrays with the same byte data are not equal');
assert.notOk(_.isEqual(u8, u16), 'Typed arrays with different types and different byte length are not equal');
assert.notOk(_.isEqual(u8, u16one), 'Typed arrays with different types, same byte length but different byte data are not equal');
From a9d6d3ee4ef896b93703c99b86e3f8a426ff027b Mon Sep 17 00:00:00 2001
From: maartenbreddels
Date: Fri, 18 Aug 2017 20:23:00 +0200
Subject: [PATCH 009/253] instead of try/catch we test for typed array using
ArrayBuffer.isView
---
underscore.js | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/underscore.js b/underscore.js
index 8e51ff4fc..32bbb4384 100644
--- a/underscore.js
+++ b/underscore.js
@@ -1205,11 +1205,10 @@
var className = toString.call(a);
if (className !== toString.call(b)) return false;
- // If a and b are of the same typed array, we compare them as DataView
- try {
- a = new DataView(a.buffer)
- b = new DataView(b.buffer)
- } catch(err) {
+ // isView returns true when it's a typedarray or DataView
+ if(ArrayBuffer.isView(a) && !(a instanceof DataView)) {
+ // If a and b are of the same typed array, we compare them as DataView
+ return deepEq(new DataView(a.buffer), new DataView(b.buffer), aStack, bStack)
}
switch (className) {
From 1105e59b4b31857a3d0e9602b1d741e61fa55aed Mon Sep 17 00:00:00 2001
From: maartenbreddels
Date: Fri, 18 Aug 2017 20:28:20 +0200
Subject: [PATCH 010/253] comment cleanups
---
underscore.js | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/underscore.js b/underscore.js
index 32bbb4384..d41253933 100644
--- a/underscore.js
+++ b/underscore.js
@@ -1200,12 +1200,11 @@
// Unwrap any wrapped objects.
if (a instanceof _) a = a._wrapped;
if (b instanceof _) b = b._wrapped;
- // typed arrays are compared by byte content, try to get a DataView
// Compare `[[Class]]` names.
var className = toString.call(a);
if (className !== toString.call(b)) return false;
- // isView returns true when it's a typedarray or DataView
+ // isView returns true when it's a typed array or DataView
if(ArrayBuffer.isView(a) && !(a instanceof DataView)) {
// If a and b are of the same typed array, we compare them as DataView
return deepEq(new DataView(a.buffer), new DataView(b.buffer), aStack, bStack)
From e67be59a1e1d900cab32ad9a9e38c937c2ba3015 Mon Sep 17 00:00:00 2001
From: maartenbreddels
Date: Fri, 18 Aug 2017 22:03:44 +0200
Subject: [PATCH 011/253] check for support of ArrayBuffer
---
test/objects.js | 47 +++++++++++++++++++++++++----------------------
underscore.js | 5 ++++-
2 files changed, 29 insertions(+), 23 deletions(-)
diff --git a/test/objects.js b/test/objects.js
index a7370d276..1f0bf2bb2 100644
--- a/test/objects.js
+++ b/test/objects.js
@@ -579,30 +579,33 @@
assert.strictEqual(_.isEqual(symbol, sameStringSymbol), false, 'Different symbols of same string are not equal');
}
- // typed arrays
- var u8 = new Uint8Array([1,2]);
- var u8b = new Uint8Array([1,2]);
- var i8 = new Int8Array([1,2]);
- var u16 = new Uint16Array([1,2]);
- var u16one = new Uint16Array([3]);
-
- assert.ok(_.isEqual(u8, u8b), 'Identical typed array data are equal');
- assert.ok(_.isEqual(u8.buffer, u8b.buffer), 'Identical ArrayBuffers are equal');
- assert.ok(_.isEqual(new DataView(u8.buffer), new DataView(u8b.buffer)), 'Identical DataViews are equal');
- assert.ok(_.isEqual(new DataView(u8.buffer), new DataView(i8.buffer)), 'Identical DataViews of different typed arrays are equal');
- assert.ok(_.isEqual(u8.buffer, i8.buffer), 'Identical ArrayBuffers of different typed arrays are equal');
-
- assert.notOk(_.isEqual({a:1, 'buffer':u8.buffer}, {'a':2, buffer:u8b.buffer}), 'Unequal objects with similar buffer properties are not equals');
-
- assert.notOk(_.isEqual(u8, i8), 'Different types of typed arrays with the same byte data are not equal');
- assert.notOk(_.isEqual(u8, u16), 'Typed arrays with different types and different byte length are not equal');
- assert.notOk(_.isEqual(u8, u16one), 'Typed arrays with different types, same byte length but different byte data are not equal');
- assert.notOk(_.isEqual(new DataView(u8.buffer), new DataView(u16.buffer)), 'Different DataViews with different length are not equal');
- assert.notOk(_.isEqual(new DataView(u8.buffer), new DataView(u16one.buffer)), 'Different DataViews with different byte data are not equal');
- assert.notOk(_.isEqual(u8.buffer, u16.buffer), 'Different ArrayBuffers with different length are not equal');
- assert.notOk(_.isEqual(u8.buffer, u16one.buffer), 'Different ArrayBuffers with different byte data are not equal');
+ // typed arrays
+ if(typeof ArrayBuffer !== "undefined") {
+ var u8 = new Uint8Array([1,2]);
+ var u8b = new Uint8Array([1,2]);
+ var i8 = new Int8Array([1,2]);
+ var u16 = new Uint16Array([1,2]);
+ var u16one = new Uint16Array([3]);
+
+ assert.ok(_.isEqual(u8, u8b), 'Identical typed array data are equal');
+ assert.ok(_.isEqual(u8.buffer, u8b.buffer), 'Identical ArrayBuffers are equal');
+ assert.ok(_.isEqual(new DataView(u8.buffer), new DataView(u8b.buffer)), 'Identical DataViews are equal');
+ assert.ok(_.isEqual(new DataView(u8.buffer), new DataView(i8.buffer)), 'Identical DataViews of different typed arrays are equal');
+ assert.ok(_.isEqual(u8.buffer, i8.buffer), 'Identical ArrayBuffers of different typed arrays are equal');
+
+ assert.notOk(_.isEqual({a:1, 'buffer':u8.buffer}, {'a':2, buffer:u8b.buffer}), 'Unequal objects with similar buffer properties are not equals');
+
+ assert.notOk(_.isEqual(u8, i8), 'Different types of typed arrays with the same byte data are not equal');
+ assert.notOk(_.isEqual(u8, u16), 'Typed arrays with different types and different byte length are not equal');
+ assert.notOk(_.isEqual(u8, u16one), 'Typed arrays with different types, same byte length but different byte data are not equal');
+ assert.notOk(_.isEqual(new DataView(u8.buffer), new DataView(u16.buffer)), 'Different DataViews with different length are not equal');
+ assert.notOk(_.isEqual(new DataView(u8.buffer), new DataView(u16one.buffer)), 'Different DataViews with different byte data are not equal');
+ assert.notOk(_.isEqual(u8.buffer, u16.buffer), 'Different ArrayBuffers with different length are not equal');
+ assert.notOk(_.isEqual(u8.buffer, u16one.buffer), 'Different ArrayBuffers with different byte data are not equal');
+ }
+
//assert.ok(_.isEqual(new DataView(u8.buffer)), new DataView(u8b.buffer))
//assert.notOk(_.isEqual(new DataView((new Uint8Array([1,2])).buffer), new DataView((new Uint8Array([5,6,10])).buffer));
});
diff --git a/underscore.js b/underscore.js
index d41253933..2fa0b00ce 100644
--- a/underscore.js
+++ b/underscore.js
@@ -19,6 +19,9 @@
// Save the previous value of the `_` variable.
var previousUnderscore = root._;
+ // not every runtime supports ArrayBuffer
+ var supportsArrayBuffer = typeof ArrayBuffer !== "undefined"
+
// Save bytes in the minified (but not gzipped) version:
var ArrayProto = Array.prototype, ObjProto = Object.prototype;
var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;
@@ -1205,7 +1208,7 @@
if (className !== toString.call(b)) return false;
// isView returns true when it's a typed array or DataView
- if(ArrayBuffer.isView(a) && !(a instanceof DataView)) {
+ if(supportsArrayBuffer && ArrayBuffer.isView(a) && !(a instanceof DataView)) {
// If a and b are of the same typed array, we compare them as DataView
return deepEq(new DataView(a.buffer), new DataView(b.buffer), aStack, bStack)
}
From 81e5bf79e9cb8918ba1b9709e8706450b04ec665 Mon Sep 17 00:00:00 2001
From: maartenbreddels
Date: Fri, 18 Aug 2017 23:34:19 +0200
Subject: [PATCH 012/253] linter fixes
---
test/objects.js | 14 +++++++-------
underscore.js | 20 ++++++++++----------
2 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/test/objects.js b/test/objects.js
index 1f0bf2bb2..9f527a497 100644
--- a/test/objects.js
+++ b/test/objects.js
@@ -582,20 +582,20 @@
// typed arrays
- if(typeof ArrayBuffer !== "undefined") {
- var u8 = new Uint8Array([1,2]);
- var u8b = new Uint8Array([1,2]);
- var i8 = new Int8Array([1,2]);
- var u16 = new Uint16Array([1,2]);
+ if (typeof ArrayBuffer !== 'undefined') {
+ var u8 = new Uint8Array([1, 2]);
+ var u8b = new Uint8Array([1, 2]);
+ var i8 = new Int8Array([1, 2]);
+ var u16 = new Uint16Array([1, 2]);
var u16one = new Uint16Array([3]);
-
+
assert.ok(_.isEqual(u8, u8b), 'Identical typed array data are equal');
assert.ok(_.isEqual(u8.buffer, u8b.buffer), 'Identical ArrayBuffers are equal');
assert.ok(_.isEqual(new DataView(u8.buffer), new DataView(u8b.buffer)), 'Identical DataViews are equal');
assert.ok(_.isEqual(new DataView(u8.buffer), new DataView(i8.buffer)), 'Identical DataViews of different typed arrays are equal');
assert.ok(_.isEqual(u8.buffer, i8.buffer), 'Identical ArrayBuffers of different typed arrays are equal');
- assert.notOk(_.isEqual({a:1, 'buffer':u8.buffer}, {'a':2, buffer:u8b.buffer}), 'Unequal objects with similar buffer properties are not equals');
+ assert.notOk(_.isEqual({a: 1, buffer: u8.buffer}, {a: 2, buffer: u8b.buffer}), 'Unequal objects with similar buffer properties are not equals');
assert.notOk(_.isEqual(u8, i8), 'Different types of typed arrays with the same byte data are not equal');
assert.notOk(_.isEqual(u8, u16), 'Typed arrays with different types and different byte length are not equal');
diff --git a/underscore.js b/underscore.js
index 2fa0b00ce..853b7a96f 100644
--- a/underscore.js
+++ b/underscore.js
@@ -20,7 +20,7 @@
var previousUnderscore = root._;
// not every runtime supports ArrayBuffer
- var supportsArrayBuffer = typeof ArrayBuffer !== "undefined"
+ var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined';
// Save bytes in the minified (but not gzipped) version:
var ArrayProto = Array.prototype, ObjProto = Object.prototype;
@@ -1208,22 +1208,22 @@
if (className !== toString.call(b)) return false;
// isView returns true when it's a typed array or DataView
- if(supportsArrayBuffer && ArrayBuffer.isView(a) && !(a instanceof DataView)) {
- // If a and b are of the same typed array, we compare them as DataView
- return deepEq(new DataView(a.buffer), new DataView(b.buffer), aStack, bStack)
+ if (supportsArrayBuffer && ArrayBuffer.isView(a) && !(a instanceof DataView)) {
+ // If a and b are of the same typed array, we compare them as DataView
+ return deepEq(new DataView(a.buffer), new DataView(b.buffer), aStack, bStack);
}
switch (className) {
// DataView we check by value
case '[object ArrayBuffer]':
- return deepEq(new DataView(a), new DataView(b), aStack, bStack)
+ return deepEq(new DataView(a), new DataView(b), aStack, bStack);
case '[object DataView]':
- if(a.byteLength !== b.byteLength) {
- return false
+ if (a.byteLength !== b.byteLength) {
+ return false;
}
- for(var i = 0; i < a.byteLength; i++) {
- if(a.getUint8(i) != b.getUint8(i)) {
- return false
+ for (var i = 0; i < a.byteLength; i++) {
+ if (a.getUint8(i) !== b.getUint8(i)) {
+ return false;
}
}
return true;
From d73f20cd67361e879aca6c93d5302c84831e6703 Mon Sep 17 00:00:00 2001
From: maartenbreddels
Date: Fri, 18 Aug 2017 23:59:54 +0200
Subject: [PATCH 013/253] support for when isView is missing
---
underscore.js | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/underscore.js b/underscore.js
index 853b7a96f..2e18eb373 100644
--- a/underscore.js
+++ b/underscore.js
@@ -19,9 +19,6 @@
// Save the previous value of the `_` variable.
var previousUnderscore = root._;
- // not every runtime supports ArrayBuffer
- var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined';
-
// Save bytes in the minified (but not gzipped) version:
var ArrayProto = Array.prototype, ObjProto = Object.prototype;
var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;
@@ -48,6 +45,27 @@
this._wrapped = obj;
};
+ // not every runtime supports ArrayBuffer
+ var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined';
+ // list from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays
+ var typedArrayNames = [
+ '[object Int8Array]',
+ '[object Int16Array]',
+ '[object Int32Array]',
+ '[object Uint8Array]',
+ '[object Uint8ClampedArray]',
+ '[object Uint16Array]',
+ '[object Uint32Array]',
+ '[object Float32Array]',
+ '[object Float64Array]'
+ ];
+ var isTypedArray = function(a) {
+ // second check is from the above whitelist, but the first check is more future proof
+ // since new typed arrays may arrive
+ return (supportsArrayBuffer && ArrayBuffer.isView && ArrayBuffer.isView(a) && !(a instanceof DataView))
+ || _.contains(typedArrayNames, toString.call(a));
+ };
+
// Export the Underscore object for **Node.js**, with
// backwards-compatibility for their old module API. If we're in
// the browser, add `_` as a global object.
@@ -1208,7 +1226,7 @@
if (className !== toString.call(b)) return false;
// isView returns true when it's a typed array or DataView
- if (supportsArrayBuffer && ArrayBuffer.isView(a) && !(a instanceof DataView)) {
+ if (isTypedArray(a)) {
// If a and b are of the same typed array, we compare them as DataView
return deepEq(new DataView(a.buffer), new DataView(b.buffer), aStack, bStack);
}
From 80d56b984129bbab514576ff0a569d755c9a406f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?=
Date: Wed, 5 Sep 2018 17:16:59 +0300
Subject: [PATCH 014/253] fixed return undefined in first and last with guard
---
test/arrays.js | 9 ++++-----
underscore.js | 4 ++--
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/test/arrays.js b/test/arrays.js
index 86392ed42..b89f2b8e9 100644
--- a/test/arrays.js
+++ b/test/arrays.js
@@ -12,8 +12,8 @@
assert.deepEqual(_.first([1, 2, 3], 5), [1, 2, 3], 'returns the whole array if n > length');
var result = (function(){ return _.first(arguments); }(4, 3, 2, 1));
assert.strictEqual(result, 4, 'works on an arguments object');
- result = _.map([[1, 2, 3], [1, 2, 3]], _.first);
- assert.deepEqual(result, [1, 1], 'works well with _.map');
+ result = _.map([[1, 2, 3], [], [1, 2, 3]], _.first);
+ assert.deepEqual(result, [1, void 0, 1], 'works well with _.map');
assert.strictEqual(_.first(null), void 0, 'returns undefined when called on null');
assert.deepEqual(_.first([], 10), [], 'returns an empty array when called with an explicit number of elements to return');
assert.deepEqual(_.first([], 1), [], 'returns an empty array when called with an explicit number of elements to return');
@@ -70,10 +70,9 @@
assert.deepEqual(_.last([1, 2, 3], 5), [1, 2, 3], 'returns the whole array if n > length');
var result = (function(){ return _(arguments).last(); }(1, 2, 3, 4));
assert.strictEqual(result, 4, 'works on an arguments object');
- result = _.map([[1, 2, 3], [1, 2, 3]], _.last);
- assert.deepEqual(result, [3, 3], 'works well with _.map');
+ result = _.map([[1, 2, 3], [], [1, 2, 3]], _.last);
+ assert.deepEqual(result, [3, void 0, 3], 'works well with _.map');
assert.strictEqual(_.last(null), void 0, 'returns undefined when called on null');
-
assert.deepEqual(_.last([], 10), [], 'returns an empty array when called with an explicit number of elements to return');
assert.deepEqual(_.last([], 1), [], 'returns an empty array when called with an explicit number of elements to return');
assert.deepEqual(_.last(null, 5), [], 'returns an empty array when called with an explicit number of elements to return');
diff --git a/underscore.js b/underscore.js
index 8219dc508..50a618caf 100644
--- a/underscore.js
+++ b/underscore.js
@@ -497,7 +497,7 @@
// values in the array. Aliased as `head` and `take`. The **guard** check
// allows it to work with `_.map`.
_.first = _.head = _.take = function(array, n, guard) {
- if (array == null || array.length < 1) return n == null ? void 0 : [];
+ 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);
};
@@ -512,7 +512,7 @@
// Get the last element of an array. Passing **n** will return the last N
// values in the array.
_.last = function(array, n, guard) {
- if (array == null || array.length < 1) return n == null ? void 0 : [];
+ 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));
};
From fa118e74ab012cf38775f2245d9b68d1a075c6e4 Mon Sep 17 00:00:00 2001
From: Temur
Date: Wed, 8 Jan 2020 00:50:12 +0400
Subject: [PATCH 015/253] Fix documentation entry for "sortedIndex" function
Documentation for the `sortedIndex()` was at least ambiguous at this point, or even wrong, consider for example `let m = [ 1, 2, 4, 4, 4, 5, 6, 7 ];` array, if we are searching for `4`, like so: `_.sortedIndex(m, 4);`, it actually returns `2` which is a *smallest* index of 4 between all it's occurences, not simply the index found by binary search, at this point true binary search could return `3` instead of `2`. So, it is important to state explicitly in the documentation that the index returned is indeed *the smallest index*, as I corrected here. Please apply this update.
---
index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/index.html b/index.html
index 0e18217cc..fe20a9f78 100644
--- a/index.html
+++ b/index.html
@@ -1091,7 +1091,7 @@ Array Functions
_.sortedIndex(array, value, [iteratee], [context])
- Uses a binary search to determine the index at which the value
+ 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
sorted order. If an iteratee function is provided,
it will be used to compute the sort ranking of each value, including the value you pass.
From 934052aa9471e537ec9ae175a9e6868a5d4be28b Mon Sep 17 00:00:00 2001
From: Temur
Date: Wed, 8 Jan 2020 01:44:04 +0400
Subject: [PATCH 016/253] make sure sortedIndex() finds the smallest index
The test which is supposed to check if sortedIndex() finds the smallest index is already there, see line 137 which is quoted here:
```
assert.strictEqual(indexFor30, 2, 'finds the smallest index at which a value could be inserted to retain order');
```
-however the `var number` array used for the test case does not contain duplicates, which is fixed in this commit.
This is to ensure consistence of behavior of the sortedIndex() function.
All in all this change makes the quoted test from the line 137 more meaningful by including duplicates, given that a pure binary search algorithm could have a different result in the same scenario.
---
test/arrays.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/arrays.js b/test/arrays.js
index 86392ed42..7ecb04d24 100644
--- a/test/arrays.js
+++ b/test/arrays.js
@@ -130,9 +130,9 @@
});
QUnit.test('sortedIndex', function(assert) {
- var numbers = [10, 20, 30, 40, 50];
+ var numbers = [10, 20, 30, 30, 30, 40, 50, 60];
var indexFor35 = _.sortedIndex(numbers, 35);
- assert.strictEqual(indexFor35, 3, 'finds the index at which a value should be inserted to retain order');
+ assert.strictEqual(indexFor35, 5, 'finds the index at which a value should be inserted to retain order');
var indexFor30 = _.sortedIndex(numbers, 30);
assert.strictEqual(indexFor30, 2, 'finds the smallest index at which a value could be inserted to retain order');
From 7299ce8301e25ef62f9a91dcc6f6c2edde9faa4b Mon Sep 17 00:00:00 2001
From: Petr Penicka
Date: Thu, 27 Feb 2020 12:30:59 +0100
Subject: [PATCH 017/253] Fix order of assertion parameters
---
test/collections.js | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/test/collections.js b/test/collections.js
index fcd7e417c..2053bbea4 100644
--- a/test/collections.js
+++ b/test/collections.js
@@ -578,17 +578,17 @@
});
QUnit.test('max', function(assert) {
- assert.strictEqual(-Infinity, _.max(null), 'can handle null/undefined');
- assert.strictEqual(-Infinity, _.max(void 0), 'can handle null/undefined');
- assert.strictEqual(-Infinity, _.max(null, _.identity), 'can handle null/undefined');
+ assert.strictEqual(_.max(null), -Infinity, 'can handle null/undefined');
+ assert.strictEqual(_.max(void 0), -Infinity, 'can handle null/undefined');
+ assert.strictEqual(_.max(null, _.identity), -Infinity, 'can handle null/undefined');
assert.strictEqual(_.max([1, 2, 3]), 3, 'can perform a regular Math.max');
var neg = _.max([1, 2, 3], function(num){ return -num; });
assert.strictEqual(neg, 1, 'can perform a computation-based max');
- assert.strictEqual(-Infinity, _.max({}), 'Maximum value of an empty object');
- assert.strictEqual(-Infinity, _.max([]), 'Maximum value of an empty array');
+ assert.strictEqual(_.max({}), -Infinity, 'Maximum value of an empty object');
+ assert.strictEqual(_.max([]), -Infinity, 'Maximum value of an empty array');
assert.strictEqual(_.max({a: 'a'}), -Infinity, 'Maximum value of a non-numeric collection');
assert.strictEqual(_.max(_.range(1, 300000)), 299999, 'Maximum value of a too-big array');
From c68b46c9edd5c699fd64cc5810604f21c562e780 Mon Sep 17 00:00:00 2001
From: Julian Gonggrijp
Date: Sat, 29 Feb 2020 15:37:04 +0100
Subject: [PATCH 018/253] Extend the iteratee test to demonstrate a logic flaw
This leads to a "Maximum call stack size exceeded" error. Since this
also prevents the builtin iteratee from being restored, the same error
turns up in the tests for omit, isArguments, #1929, tap, isMatch,
matcher, findKey, mapObject, random and escape+unescape.
---
test/functions.js | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/test/functions.js b/test/functions.js
index 696edbd08..0418e67a8 100644
--- a/test/functions.js
+++ b/test/functions.js
@@ -701,12 +701,12 @@
// Test custom iteratee
var builtinIteratee = _.iteratee;
- _.iteratee = function(value) {
+ _.iteratee = function(value, context) {
// RegEx values return a function that returns the number of matches
if (_.isRegExp(value)) return function(obj) {
return (obj.match(value) || []).length;
};
- return value;
+ return builtinIteratee(value, context);
};
var collection = ['foo', 'bar', 'bbiz'];
@@ -734,6 +734,17 @@
var objCollection = {a: 'foo', b: 'bar', c: 'bbiz'};
assert.deepEqual(_.mapObject(objCollection, /b/g), {a: 0, b: 1, c: 2});
+ // Ensure that the overridden iteratee can still fall back on the builtin
+ // iteratee.
+ assert.strictEqual(_.iteratee(), _.identity);
+ assert.deepEqual(_.toArray(_.iteratee(fn)(1, 2, 3)), _.range(1, 4));
+ var matcher = _.iteratee({b: 'bar'});
+ assert.equal(matcher(objCollection), true);
+ assert.equal(matcher({}), false);
+ var property = _.iteratee('b');
+ assert.equal(property(objCollection), 'bar');
+ assert.equal(property({}), undefined);
+
// Restore the builtin iteratee
_.iteratee = builtinIteratee;
});
From 1c822334e3f4332e7f4f0c0cbfb3052aa1cbe1e0 Mon Sep 17 00:00:00 2001
From: Julian Gonggrijp
Date: Sat, 29 Feb 2020 15:44:24 +0100
Subject: [PATCH 019/253] Fix the bug
---
underscore.js | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/underscore.js b/underscore.js
index 5cdf62ea6..0fff5f28f 100644
--- a/underscore.js
+++ b/underscore.js
@@ -84,13 +84,10 @@
};
};
- var builtinIteratee;
-
// An internal function to generate callbacks that can be applied to each
// element in a collection, returning the desired result — either `identity`,
// an arbitrary callback, a property matcher, or a property accessor.
- var cb = function(value, context, argCount) {
- if (_.iteratee !== builtinIteratee) return _.iteratee(value, context);
+ var baseIteratee = function(value, context, argCount) {
if (value == null) return _.identity;
if (_.isFunction(value)) return optimizeCb(value, context, argCount);
if (_.isObject(value) && !_.isArray(value)) return _.matcher(value);
@@ -100,8 +97,15 @@
// External wrapper for our callback generator. Users may customize
// `_.iteratee` if they want additional predicate/iteratee shorthand styles.
// This abstraction hides the internal-only argCount argument.
- _.iteratee = builtinIteratee = function(value, context) {
- return cb(value, context, Infinity);
+ var exportIteratee = _.iteratee = function(value, context) {
+ return baseIteratee(value, context, Infinity);
+ };
+
+ // The function we actually call internally. It invokes _.iteratee if
+ // overridden, otherwise baseIteratee.
+ var cb = function(value, context, argCount) {
+ if (_.iteratee !== exportIteratee) return _.iteratee(value, context);
+ return baseIteratee(value, context, argCount);
};
// Some functions take a variable number of arguments, or a few expected
From e0050057077cdf1fa33e03ef05039c659399acfa Mon Sep 17 00:00:00 2001
From: Julian Gonggrijp
Date: Tue, 25 Feb 2020 17:52:47 +0100
Subject: [PATCH 020/253] Change to ES6 import/export notation
---
underscore-module.js | 8 +
underscore.js => underscore-source.js | 795 +++++++++++++-------------
2 files changed, 403 insertions(+), 400 deletions(-)
create mode 100644 underscore-module.js
rename underscore.js => underscore-source.js (76%)
diff --git a/underscore-module.js b/underscore-module.js
new file mode 100644
index 000000000..79c92df97
--- /dev/null
+++ b/underscore-module.js
@@ -0,0 +1,8 @@
+import * as allExports from './underscore-source';
+import { mixin } from './underscore-source';
+
+// Add all of the Underscore functions to the wrapper object and return it.
+export default mixin(allExports);
+
+// Export the separate functions and constants as well.
+export * from './underscore-source';
diff --git a/underscore.js b/underscore-source.js
similarity index 76%
rename from underscore.js
rename to underscore-source.js
index 0fff5f28f..4c84e0adc 100644
--- a/underscore.js
+++ b/underscore-source.js
@@ -3,7 +3,9 @@
// (c) 2009-2018 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
// Underscore may be freely distributed under the MIT license.
-(function() {
+// There used to be an IIFE around all of the code below. The wrapper
+// is gone, but I'm keeping the indent for now to keep the diff as
+// small as possible.
// Baseline setup
// --------------
@@ -38,34 +40,21 @@
// Naked function reference for surrogate-prototype-swapping.
var Ctor = function(){};
- // Create a safe reference to the Underscore object for use below.
- var _ = function(obj) {
+ // The Underscore object. All exported functions below are added to it in the
+ // underscore-module.js using the mixin function.
+ export default function _(obj) {
if (obj instanceof _) return obj;
if (!(this instanceof _)) return new _(obj);
this._wrapped = obj;
- };
-
- // Export the Underscore object for **Node.js**, with
- // backwards-compatibility for their old module API. If we're in
- // the browser, add `_` as a global object.
- // (`nodeType` is checked to ensure that `module`
- // and `exports` are not HTML elements.)
- if (typeof exports != 'undefined' && !exports.nodeType) {
- if (typeof module != 'undefined' && !module.nodeType && module.exports) {
- exports = module.exports = _;
- }
- exports._ = _;
- } else {
- root._ = _;
}
// Current version.
- _.VERSION = '1.9.2';
+ export var VERSION = _.VERSION = '1.9.2';
// Internal function that returns an efficient (for current engines) version
// of the passed-in callback, to be repeatedly applied in other Underscore
// functions.
- var optimizeCb = function(func, context, argCount) {
+ function optimizeCb(func, context, argCount) {
if (context === void 0) return func;
switch (argCount == null ? 3 : argCount) {
case 1: return function(value) {
@@ -82,38 +71,39 @@
return function() {
return func.apply(context, arguments);
};
- };
+ }
// An internal function to generate callbacks that can be applied to each
// element in a collection, returning the desired result — either `identity`,
// an arbitrary callback, a property matcher, or a property accessor.
- var baseIteratee = function(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);
- };
+ 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);
+ }
// External wrapper for our callback generator. Users may customize
// `_.iteratee` if they want additional predicate/iteratee shorthand styles.
// This abstraction hides the internal-only argCount argument.
- var exportIteratee = _.iteratee = function(value, context) {
+ _.iteratee = iteratee;
+ export function iteratee(value, context) {
return baseIteratee(value, context, Infinity);
- };
+ }
// The function we actually call internally. It invokes _.iteratee if
// overridden, otherwise baseIteratee.
- var cb = function(value, context, argCount) {
- if (_.iteratee !== exportIteratee) return _.iteratee(value, context);
+ function cb(value, context, argCount) {
+ if (_.iteratee !== iteratee) return _.iteratee(value, context);
return baseIteratee(value, context, argCount);
- };
+ }
// Some functions take a variable number of arguments, or a few expected
// arguments at the beginning and then a variable number of values to operate
// on. This helper accumulates all remaining arguments past the function’s
// argument length (or an explicit `startIndex`), into an array that becomes
// the last argument. Similar to ES6’s "rest parameter".
- var restArguments = function(func, startIndex) {
+ export function restArguments(func, startIndex) {
startIndex = startIndex == null ? func.length - 1 : +startIndex;
return function() {
var length = Math.max(arguments.length - startIndex, 0),
@@ -134,36 +124,36 @@
args[startIndex] = rest;
return func.apply(this, args);
};
- };
+ }
// An internal function for creating a new object that inherits from another.
- var baseCreate = function(prototype) {
- if (!_.isObject(prototype)) return {};
+ function baseCreate(prototype) {
+ if (!isObject(prototype)) return {};
if (nativeCreate) return nativeCreate(prototype);
Ctor.prototype = prototype;
var result = new Ctor;
Ctor.prototype = null;
return result;
- };
+ }
- var shallowProperty = function(key) {
+ function shallowProperty(key) {
return function(obj) {
return obj == null ? void 0 : obj[key];
};
- };
+ }
- var has = function(obj, path) {
+ function has(obj, path) {
return obj != null && hasOwnProperty.call(obj, path);
}
- var deepGet = function(obj, path) {
+ 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]];
}
return length ? obj : void 0;
- };
+ }
// Helper for collection methods to determine whether a collection
// should be iterated as an array or as an object.
@@ -171,10 +161,10 @@
// Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094
var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;
var getLength = shallowProperty('length');
- var isArrayLike = function(collection) {
+ function isArrayLike(collection) {
var length = getLength(collection);
return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX;
- };
+ }
// Collection Functions
// --------------------
@@ -182,7 +172,8 @@
// The cornerstone, an `each` implementation, aka `forEach`.
// Handles raw objects in addition to array-likes. Treats all
// sparse array-likes as if they were dense.
- _.each = _.forEach = function(obj, iteratee, context) {
+ export { each as forEach };
+ export function each(obj, iteratee, context) {
iteratee = optimizeCb(iteratee, context);
var i, length;
if (isArrayLike(obj)) {
@@ -190,18 +181,19 @@
iteratee(obj[i], i, obj);
}
} else {
- var keys = _.keys(obj);
+ var keys = _keys(obj);
for (i = 0, length = keys.length; i < length; i++) {
iteratee(obj[keys[i]], keys[i], obj);
}
}
return obj;
- };
+ }
// Return the results of applying the iteratee to each element.
- _.map = _.collect = function(obj, iteratee, context) {
+ export { map as collect };
+ export function map(obj, iteratee, context) {
iteratee = cb(iteratee, context);
- var keys = !isArrayLike(obj) && _.keys(obj),
+ var keys = !isArrayLike(obj) && _keys(obj),
length = (keys || obj).length,
results = Array(length);
for (var index = 0; index < length; index++) {
@@ -209,14 +201,14 @@
results[index] = iteratee(obj[currentKey], currentKey, obj);
}
return results;
- };
+ }
// Create a reducing function iterating left or right.
- var createReduce = function(dir) {
+ function createReduce(dir) {
// Wrap code that reassigns argument variables in a separate function than
// the one that accesses `arguments.length` to avoid a perf hit. (#1991)
var reducer = function(obj, iteratee, memo, initial) {
- var keys = !isArrayLike(obj) && _.keys(obj),
+ var keys = !isArrayLike(obj) && _keys(obj),
length = (keys || obj).length,
index = dir > 0 ? 0 : length - 1;
if (!initial) {
@@ -234,82 +226,85 @@
var initial = arguments.length >= 3;
return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);
};
- };
+ }
// **Reduce** builds up a single result from a list of values, aka `inject`,
// or `foldl`.
- _.reduce = _.foldl = _.inject = createReduce(1);
+ export var reduce = createReduce(1);
+ export { reduce as foldl, reduce as inject };
// The right-associative version of reduce, also known as `foldr`.
- _.reduceRight = _.foldr = createReduce(-1);
+ export var reduceRight = createReduce(-1);
+ export { reduceRight as foldr };
- // Return the first value which passes a truth test. Aliased as `detect`.
- _.find = _.detect = function(obj, predicate, context) {
- var keyFinder = isArrayLike(obj) ? _.findIndex : _.findKey;
+ // Return the first value which passes a truth test.
+ export { find as detect };
+ export 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];
- };
+ }
// Return all the elements that pass a truth test.
- // Aliased as `select`.
- _.filter = _.select = function(obj, predicate, context) {
+ export { filter as select };
+ export function filter(obj, predicate, context) {
var results = [];
predicate = cb(predicate, context);
- _.each(obj, function(value, index, list) {
+ each(obj, function(value, index, list) {
if (predicate(value, index, list)) results.push(value);
});
return results;
- };
+ }
// Return all the elements for which a truth test fails.
- _.reject = function(obj, predicate, context) {
- return _.filter(obj, _.negate(cb(predicate)), context);
- };
+ export function reject(obj, predicate, context) {
+ return filter(obj, negate(cb(predicate)), context);
+ }
// Determine whether all of the elements match a truth test.
- // Aliased as `all`.
- _.every = _.all = function(obj, predicate, context) {
+ export { every as all };
+ export function every(obj, predicate, context) {
predicate = cb(predicate, context);
- var keys = !isArrayLike(obj) && _.keys(obj),
+ 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;
}
return true;
- };
+ }
// Determine if at least one element in the object matches a truth test.
- // Aliased as `any`.
- _.some = _.any = function(obj, predicate, context) {
+ export { some as any };
+ export function some(obj, predicate, context) {
predicate = cb(predicate, context);
- var keys = !isArrayLike(obj) && _.keys(obj),
+ 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;
}
return false;
- };
+ }
// Determine if the array or object contains a given item (using `===`).
- // Aliased as `includes` and `include`.
- _.contains = _.includes = _.include = function(obj, item, fromIndex, guard) {
- if (!isArrayLike(obj)) obj = _.values(obj);
+ export { contains as includes, contains as include };
+ export 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;
- };
+ return indexOf(obj, item, fromIndex) >= 0;
+ }
// Invoke a method (with arguments) on every item in a collection.
- _.invoke = restArguments(function(obj, path, args) {
+ export var invoke = restArguments(function(obj, path, args) {
var contextPath, func;
- if (_.isFunction(path)) {
+ if (isFunction(path)) {
func = path;
- } else if (_.isArray(path)) {
+ } else if (isArray(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) {
@@ -323,28 +318,28 @@
});
// Convenience version of a common use case of `map`: fetching a property.
- _.pluck = function(obj, key) {
- return _.map(obj, _.property(key));
- };
+ export function pluck(obj, key) {
+ return map(obj, property(key));
+ }
// Convenience version of a common use case of `filter`: selecting only objects
// containing specific `key:value` pairs.
- _.where = function(obj, attrs) {
- return _.filter(obj, _.matcher(attrs));
- };
+ export function where(obj, attrs) {
+ return filter(obj, matcher(attrs));
+ }
// Convenience version of a common use case of `find`: getting the first object
// containing specific `key:value` pairs.
- _.findWhere = function(obj, attrs) {
- return _.find(obj, _.matcher(attrs));
- };
+ export function findWhere(obj, attrs) {
+ return find(obj, matcher(attrs));
+ }
// Return the maximum element (or element-based computation).
- _.max = function(obj, iteratee, context) {
+ export 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);
+ obj = isArrayLike(obj) ? obj : values(obj);
for (var i = 0, length = obj.length; i < length; i++) {
value = obj[i];
if (value != null && value > result) {
@@ -353,7 +348,7 @@
}
} else {
iteratee = cb(iteratee, context);
- _.each(obj, function(v, index, list) {
+ each(obj, function(v, index, list) {
computed = iteratee(v, index, list);
if (computed > lastComputed || computed === -Infinity && result === -Infinity) {
result = v;
@@ -362,14 +357,14 @@
});
}
return result;
- };
+ }
// Return the minimum element (or element-based computation).
- _.min = function(obj, iteratee, context) {
+ export 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);
+ obj = isArrayLike(obj) ? obj : values(obj);
for (var i = 0, length = obj.length; i < length; i++) {
value = obj[i];
if (value != null && value < result) {
@@ -378,7 +373,7 @@
}
} else {
iteratee = cb(iteratee, context);
- _.each(obj, function(v, index, list) {
+ each(obj, function(v, index, list) {
computed = iteratee(v, index, list);
if (computed < lastComputed || computed === Infinity && result === Infinity) {
result = v;
@@ -387,40 +382,40 @@
});
}
return result;
- };
+ }
// Shuffle a collection.
- _.shuffle = function(obj) {
- return _.sample(obj, Infinity);
- };
+ export function shuffle(obj) {
+ return sample(obj, Infinity);
+ }
// Sample **n** random values from a collection using the modern version of the
// [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle).
// If **n** is not specified, returns a single random element.
// The internal `guard` argument allows it to work with `map`.
- _.sample = function(obj, n, guard) {
+ export 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 = isArrayLike(obj) ? _.clone(obj) : _.values(obj);
+ var sample = isArrayLike(obj) ? clone(obj) : values(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 rand = random(index, last);
var temp = sample[index];
sample[index] = sample[rand];
sample[rand] = temp;
}
return sample.slice(0, n);
- };
+ }
// Sort the object's values by a criterion produced by an iteratee.
- _.sortBy = function(obj, iteratee, context) {
+ export function sortBy(obj, iteratee, context) {
var index = 0;
iteratee = cb(iteratee, context);
- return _.pluck(_.map(obj, function(value, key, list) {
+ return pluck(map(obj, function(value, key, list) {
return {
value: value,
index: index++,
@@ -435,62 +430,62 @@
}
return left.index - right.index;
}), 'value');
- };
+ }
// An internal function used for aggregate "group by" operations.
- var group = function(behavior, partition) {
+ function group(behavior, partition) {
return function(obj, iteratee, context) {
var result = partition ? [[], []] : {};
iteratee = cb(iteratee, context);
- _.each(obj, function(value, index) {
+ each(obj, function(value, index) {
var key = iteratee(value, index, obj);
behavior(result, value, key);
});
return result;
};
- };
+ }
// Groups the object's values by a criterion. Pass either a string attribute
// to group by, or a function that returns the criterion.
- _.groupBy = group(function(result, value, key) {
+ export var groupBy = group(function(result, value, key) {
if (has(result, key)) result[key].push(value); else result[key] = [value];
});
// Indexes the object's values by a criterion, similar to `groupBy`, but for
// when you know that your index values will be unique.
- _.indexBy = group(function(result, value, key) {
+ export var indexBy = group(function(result, value, key) {
result[key] = value;
});
// Counts instances of an object that group by a certain criterion. Pass
// either a string attribute to count by, or a function that returns the
// criterion.
- _.countBy = group(function(result, value, key) {
+ export var countBy = group(function(result, value, key) {
if (has(result, key)) result[key]++; else result[key] = 1;
});
var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;
// Safely create a real, live array from anything iterable.
- _.toArray = function(obj) {
+ export 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)) {
// Keep surrogate pair characters together
return obj.match(reStrSymbol);
}
- if (isArrayLike(obj)) return _.map(obj, _.identity);
- return _.values(obj);
- };
+ if (isArrayLike(obj)) return map(obj, identity);
+ return values(obj);
+ }
// Return the number of elements in an object.
- _.size = function(obj) {
+ export function size(obj) {
if (obj == null) return 0;
- return isArrayLike(obj) ? obj.length : _.keys(obj).length;
- };
+ return isArrayLike(obj) ? obj.length : _keys(obj).length;
+ }
// Split a collection into two arrays: one whose elements all satisfy the given
// predicate, and one whose elements all do not satisfy the predicate.
- _.partition = group(function(result, value, pass) {
+ export var partition = group(function(result, value, pass) {
result[pass ? 0 : 1].push(value);
}, true);
@@ -498,48 +493,49 @@
// ---------------
// Get the first element of an array. Passing **n** will return the first N
- // values in the array. Aliased as `head` and `take`. The **guard** check
- // allows it to work with `_.map`.
- _.first = _.head = _.take = function(array, n, guard) {
+ // values in the array. The **guard** check allows it to work with `map`.
+ export { first as head, first as take };
+ export function first(array, n, guard) {
if (array == null || array.length < 1) return n == null ? void 0 : [];
if (n == null || guard) return array[0];
- return _.initial(array, array.length - n);
- };
+ return initial(array, array.length - n);
+ }
// Returns everything but the last entry of the array. Especially useful on
// the arguments object. Passing **n** will return all the values in
// the array, excluding the last N.
- _.initial = function(array, n, guard) {
+ export function initial(array, n, guard) {
return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
- };
+ }
// Get the last element of an array. Passing **n** will return the last N
// values in the array.
- _.last = function(array, n, guard) {
+ export function last(array, n, guard) {
if (array == null || array.length < 1) return n == null ? void 0 : [];
if (n == null || guard) return array[array.length - 1];
- return _.rest(array, Math.max(0, array.length - n));
- };
+ return rest(array, Math.max(0, array.length - n));
+ }
- // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.
- // Especially useful on the arguments object. Passing an **n** will return
- // the rest N values in the array.
- _.rest = _.tail = _.drop = function(array, n, guard) {
+ // Returns everything but the first entry of the array. Especially useful on
+ // the arguments object. Passing an **n** will return the rest N values in the
+ // array.
+ export { rest as tail, rest as drop };
+ export function rest(array, n, guard) {
return slice.call(array, n == null || guard ? 1 : n);
- };
+ }
// Trim out all falsy values from an array.
- _.compact = function(array) {
- return _.filter(array, Boolean);
- };
+ export function compact(array) {
+ return filter(array, Boolean);
+ }
// Internal implementation of a recursive `flatten` function.
- var flatten = function(input, shallow, strict, output) {
+ function flatten(input, shallow, strict, output) {
output = output || [];
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))) {
// Flatten current level of array or arguments object.
if (shallow) {
var j = 0, len = value.length;
@@ -553,16 +549,17 @@
}
}
return output;
- };
+ }
// Flatten out an array, either recursively (by default), or just one level.
- _.flatten = function(array, shallow) {
+ export { _flatten as flatten };
+ function _flatten(array, shallow) {
return flatten(array, shallow, false);
- };
+ }
// Return a version of the array that does not contain the specified value(s).
- _.without = restArguments(function(array, otherArrays) {
- return _.difference(array, otherArrays);
+ export var without = restArguments(function(array, otherArrays) {
+ return difference(array, otherArrays);
});
// Produce a duplicate-free version of the array. If the array has already
@@ -570,9 +567,9 @@
// The faster algorithm will not work with an iteratee if the iteratee
// is not a one-to-one function, so providing an iteratee will disable
// the faster algorithm.
- // Aliased as `unique`.
- _.uniq = _.unique = function(array, isSorted, iteratee, context) {
- if (!_.isBoolean(isSorted)) {
+ export { uniq as unique };
+ export function uniq(array, isSorted, iteratee, context) {
+ if (!isBoolean(isSorted)) {
context = iteratee;
iteratee = isSorted;
isSorted = false;
@@ -587,69 +584,69 @@
if (!i || seen !== computed) result.push(value);
seen = computed;
} else if (iteratee) {
- if (!_.contains(seen, computed)) {
+ if (!contains(seen, computed)) {
seen.push(computed);
result.push(value);
}
- } else if (!_.contains(result, value)) {
+ } else if (!contains(result, value)) {
result.push(value);
}
}
return result;
- };
+ }
// Produce an array that contains the union: each distinct element from all of
// the passed-in arrays.
- _.union = restArguments(function(arrays) {
- return _.uniq(flatten(arrays, true, true));
+ export var union = restArguments(function(arrays) {
+ return uniq(flatten(arrays, true, true));
});
// Produce an array that contains every item shared between all the
// passed-in arrays.
- _.intersection = function(array) {
+ export function intersection(array) {
var result = [];
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);
}
return result;
- };
+ }
// Take the difference between one array and a number of other arrays.
// Only the elements present in just the first array will remain.
- _.difference = restArguments(function(array, rest) {
+ export var difference = restArguments(function(array, rest) {
rest = flatten(rest, true, true);
- return _.filter(array, function(value){
- return !_.contains(rest, value);
+ return filter(array, function(value){
+ return !contains(rest, value);
});
});
- // Complement of _.zip. Unzip accepts an array of arrays and groups
+ // Complement of zip. Unzip accepts an array of arrays and groups
// each array's elements on shared indices.
- _.unzip = function(array) {
- var length = array && _.max(array, getLength).length || 0;
+ export 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;
- };
+ }
// Zip together multiple lists into a single array -- elements that share
// an index go together.
- _.zip = restArguments(_.unzip);
+ export var zip = restArguments(unzip);
// Converts lists into objects. Pass either a single array of `[key, value]`
// pairs, or two parallel arrays of the same length -- one of keys, and one of
- // the corresponding values. Passing by pairs is the reverse of _.pairs.
- _.object = function(list, values) {
+ // the corresponding values. Passing by pairs is the reverse of pairs.
+ export function object(list, values) {
var result = {};
for (var i = 0, length = getLength(list); i < length; i++) {
if (values) {
@@ -659,10 +656,10 @@
}
}
return result;
- };
+ }
// Generator function to create the findIndex and findLastIndex functions.
- var createPredicateIndexFinder = function(dir) {
+ function createPredicateIndexFinder(dir) {
return function(array, predicate, context) {
predicate = cb(predicate, context);
var length = getLength(array);
@@ -672,15 +669,15 @@
}
return -1;
};
- };
+ }
// Returns the first index on an array-like that passes a predicate test.
- _.findIndex = createPredicateIndexFinder(1);
- _.findLastIndex = createPredicateIndexFinder(-1);
+ export var findIndex = createPredicateIndexFinder(1);
+ export var findLastIndex = createPredicateIndexFinder(-1);
// Use a comparator function to figure out the smallest index at which
// an object should be inserted so as to maintain order. Uses binary search.
- _.sortedIndex = function(array, obj, iteratee, context) {
+ export function sortedIndex(array, obj, iteratee, context) {
iteratee = cb(iteratee, context, 1);
var value = iteratee(obj);
var low = 0, high = getLength(array);
@@ -689,10 +686,10 @@
if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;
}
return low;
- };
+ }
// Generator function to create the indexOf and lastIndexOf functions.
- var createIndexFinder = function(dir, predicateFind, sortedIndex) {
+ function createIndexFinder(dir, predicateFind, sortedIndex) {
return function(array, item, idx) {
var i = 0, length = getLength(array);
if (typeof idx == 'number') {
@@ -706,7 +703,7 @@
return array[idx] === item ? idx : -1;
}
if (item !== item) {
- idx = predicateFind(slice.call(array, i, length), _.isNaN);
+ 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) {
@@ -714,19 +711,19 @@
}
return -1;
};
- };
+ }
// Return the position of the first occurrence of an item in an array,
// or -1 if the item is not included in the array.
// If the array is large and already in sort order, pass `true`
// for **isSorted** to use binary search.
- _.indexOf = createIndexFinder(1, _.findIndex, _.sortedIndex);
- _.lastIndexOf = createIndexFinder(-1, _.findLastIndex);
+ export var indexOf = createIndexFinder(1, findIndex, sortedIndex);
+ export var lastIndexOf = createIndexFinder(-1, findLastIndex);
// Generate an integer Array containing an arithmetic progression. A port of
// the native Python `range()` function. See
// [the Python documentation](https://docs.python.org/library/functions.html#range).
- _.range = function(start, stop, step) {
+ export function range(start, stop, step) {
if (stop == null) {
stop = start || 0;
start = 0;
@@ -743,11 +740,11 @@
}
return range;
- };
+ }
// Chunk a single array into multiple arrays, each containing `count` or fewer
// items.
- _.chunk = function(array, count) {
+ export function chunk(array, count) {
if (count == null || count < 1) return [];
var result = [];
var i = 0, length = array.length;
@@ -755,26 +752,26 @@
result.push(slice.call(array, i, i += count));
}
return result;
- };
+ }
// Function (ahem) Functions
// ------------------
// Determines whether to execute a function as a constructor
// or a normal function with the provided arguments.
- var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) {
+ 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;
+ if (isObject(result)) return result;
return self;
- };
+ }
// Create a function bound to a given object (assigning `this`, and arguments,
// optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if
// available.
- _.bind = restArguments(function(func, context, args) {
- if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function');
+ export var bind = 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));
});
@@ -784,9 +781,9 @@
// Partially apply a function by creating a version that has had some of its
// arguments pre-filled, without changing its dynamic `this` context. _ acts
// as a placeholder by default, allowing any combination of arguments to be
- // pre-filled. Set `_.partial.placeholder` for a custom placeholder argument.
- _.partial = restArguments(function(func, boundArgs) {
- var placeholder = _.partial.placeholder;
+ // pre-filled. Set `partial.placeholder` for a custom placeholder argument.
+ export var partial = restArguments(function(func, boundArgs) {
+ var placeholder = partial.placeholder;
var bound = function() {
var position = 0, length = boundArgs.length;
var args = Array(length);
@@ -799,23 +796,23 @@
return bound;
});
- _.partial.placeholder = _;
+ partial.placeholder = _;
// Bind a number of an object's methods to that object. Remaining arguments
// are the method names to be bound. Useful for ensuring that all callbacks
// defined on an object belong to it.
- _.bindAll = restArguments(function(obj, keys) {
+ export var bindAll = 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);
}
});
// Memoize an expensive function by storing its results.
- _.memoize = function(func, hasher) {
+ export function memoize(func, hasher) {
var memoize = function(key) {
var cache = memoize.cache;
var address = '' + (hasher ? hasher.apply(this, arguments) : key);
@@ -824,11 +821,11 @@
};
memoize.cache = {};
return memoize;
- };
+ }
// Delays a function for the given number of milliseconds, and then calls
// it with the arguments supplied.
- _.delay = restArguments(function(func, wait, args) {
+ export var delay = restArguments(function(func, wait, args) {
return setTimeout(function() {
return func.apply(null, args);
}, wait);
@@ -836,29 +833,29 @@
// Defers a function, scheduling it to run after the current call stack has
// cleared.
- _.defer = _.partial(_.delay, _, 1);
+ export var defer = partial(delay, _, 1);
// Returns a function, that, when invoked, will only be triggered at most once
// during a given window of time. Normally, the throttled function will run
// as much as it can, without ever going more than once per `wait` duration;
// but if you'd like to disable the execution on the leading edge, pass
// `{leading: false}`. To disable execution on the trailing edge, ditto.
- _.throttle = function(func, wait, options) {
+ export 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();
+ previous = options.leading === false ? 0 : now();
timeout = null;
result = func.apply(context, args);
if (!timeout) context = args = null;
};
var throttled = function() {
- var now = _.now();
- if (!previous && options.leading === false) previous = now;
- var remaining = wait - (now - previous);
+ var _now = now();
+ if (!previous && options.leading === false) previous = _now;
+ var remaining = wait - (_now - previous);
context = this;
args = arguments;
if (remaining <= 0 || remaining > wait) {
@@ -866,7 +863,7 @@
clearTimeout(timeout);
timeout = null;
}
- previous = now;
+ previous = _now;
result = func.apply(context, args);
if (!timeout) context = args = null;
} else if (!timeout && options.trailing !== false) {
@@ -882,13 +879,13 @@
};
return throttled;
- };
+ }
// Returns a function, that, as long as it continues to be invoked, will not
// be triggered. The function will be called after it stops being called for
// N milliseconds. If `immediate` is passed, trigger the function on the
// leading edge, instead of the trailing.
- _.debounce = function(func, wait, immediate) {
+ export function debounce(func, wait, immediate) {
var timeout, result;
var later = function(context, args) {
@@ -903,7 +900,7 @@
timeout = setTimeout(later, wait);
if (callNow) result = func.apply(this, args);
} else {
- timeout = _.delay(later, wait, this, args);
+ timeout = delay(later, wait, this, args);
}
return result;
@@ -915,25 +912,25 @@
};
return debounced;
- };
+ }
// Returns the first function passed as an argument to the second,
// allowing you to adjust arguments, run code before and after, and
// conditionally execute the original function.
- _.wrap = function(func, wrapper) {
- return _.partial(wrapper, func);
- };
+ export function wrap(func, wrapper) {
+ return partial(wrapper, func);
+ }
// Returns a negated version of the passed-in predicate.
- _.negate = function(predicate) {
+ export function negate(predicate) {
return function() {
return !predicate.apply(this, arguments);
};
- };
+ }
// Returns a function that is the composition of a list of functions, each
// consuming the return value of the function that follows.
- _.compose = function() {
+ export function compose() {
var args = arguments;
var start = args.length - 1;
return function() {
@@ -942,19 +939,19 @@
while (i--) result = args[i].call(this, result);
return result;
};
- };
+ }
// Returns a function that will only be executed on and after the Nth call.
- _.after = function(times, func) {
+ export function after(times, func) {
return function() {
if (--times < 1) {
return func.apply(this, arguments);
}
};
- };
+ }
// Returns a function that will only be executed up to (but not including) the Nth call.
- _.before = function(times, func) {
+ export function before(times, func) {
var memo;
return function() {
if (--times > 0) {
@@ -963,13 +960,11 @@
if (times <= 1) func = null;
return memo;
};
- };
+ }
// Returns a function that will be executed at most one time, no matter how
// often you call it. Useful for lazy initialization.
- _.once = _.partial(_.before, 2);
-
- _.restArguments = restArguments;
+ export var once = partial(before, 2);
// Object Functions
// ----------------
@@ -979,61 +974,62 @@
var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',
'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
- var collectNonEnumProps = function(obj, keys) {
+ function collectNonEnumProps(obj, keys) {
var nonEnumIdx = nonEnumerableProps.length;
var constructor = obj.constructor;
- var proto = _.isFunction(constructor) && constructor.prototype || ObjProto;
+ var proto = isFunction(constructor) && constructor.prototype || ObjProto;
// Constructor is a special case.
var prop = 'constructor';
- if (has(obj, prop) && !_.contains(keys, prop)) keys.push(prop);
+ if (has(obj, prop) && !contains(keys, prop)) keys.push(prop);
while (nonEnumIdx--) {
prop = nonEnumerableProps[nonEnumIdx];
- if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) {
+ if (prop in obj && obj[prop] !== proto[prop] && !contains(keys, prop)) {
keys.push(prop);
}
}
- };
+ }
// Retrieve the names of an object's own properties.
// Delegates to **ECMAScript 5**'s native `Object.keys`.
- _.keys = function(obj) {
- if (!_.isObject(obj)) return [];
+ export { _keys as keys };
+ 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);
// Ahem, IE < 9.
if (hasEnumBug) collectNonEnumProps(obj, keys);
return keys;
- };
+ }
// Retrieve all the property names of an object.
- _.allKeys = function(obj) {
- if (!_.isObject(obj)) return [];
+ export function allKeys(obj) {
+ if (!isObject(obj)) return [];
var keys = [];
for (var key in obj) keys.push(key);
// Ahem, IE < 9.
if (hasEnumBug) collectNonEnumProps(obj, keys);
return keys;
- };
+ }
// Retrieve the values of an object's properties.
- _.values = function(obj) {
- var keys = _.keys(obj);
+ export 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]];
}
return values;
- };
+ }
// Returns the results of applying the iteratee to each element of the object.
- // In contrast to _.map it returns an object.
- _.mapObject = function(obj, iteratee, context) {
+ // In contrast to map it returns an object.
+ export function mapObject(obj, iteratee, context) {
iteratee = cb(iteratee, context);
- var keys = _.keys(obj),
+ var keys = _keys(obj),
length = keys.length,
results = {};
for (var index = 0; index < length; index++) {
@@ -1041,42 +1037,42 @@
results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
}
return results;
- };
+ }
// Convert an object into a list of `[key, value]` pairs.
- // The opposite of _.object.
- _.pairs = function(obj) {
- var keys = _.keys(obj);
+ // The opposite of object.
+ export 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]]];
}
return pairs;
- };
+ }
// Invert the keys and values of an object. The values must be serializable.
- _.invert = function(obj) {
+ export function invert(obj) {
var result = {};
- var keys = _.keys(obj);
+ var keys = _keys(obj);
for (var i = 0, length = keys.length; i < length; i++) {
result[obj[keys[i]]] = keys[i];
}
return result;
- };
+ }
// Return a sorted list of the function names available on the object.
- // Aliased as `methods`.
- _.functions = _.methods = function(obj) {
+ export { functions as methods };
+ export 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();
- };
+ }
// An internal function for creating assigner functions.
- var createAssigner = function(keysFunc, defaults) {
+ function createAssigner(keysFunc, defaults) {
return function(obj) {
var length = arguments.length;
if (defaults) obj = Object(obj);
@@ -1092,37 +1088,38 @@
}
return obj;
};
- };
+ }
// Extend a given object with all the properties in passed-in object(s).
- _.extend = createAssigner(_.allKeys);
+ export var extend = createAssigner(allKeys);
// Assigns a given object with all the own properties in the passed-in object(s).
// (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
- _.extendOwn = _.assign = createAssigner(_.keys);
+ export var extendOwn = createAssigner(_keys);
+ export { extendOwn as assign };
// Returns the first key on an object that passes a predicate test.
- _.findKey = function(obj, predicate, context) {
+ export function findKey(obj, predicate, context) {
predicate = cb(predicate, context);
- var keys = _.keys(obj), key;
+ 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;
}
- };
+ }
// Internal pick helper function to determine if `obj` has key `key`.
- var keyInObj = function(value, key, obj) {
+ function keyInObj(value, key, obj) {
return key in obj;
- };
+ }
// Return a copy of the object only containing the whitelisted properties.
- _.pick = restArguments(function(obj, keys) {
+ export var pick = restArguments(function(obj, keys) {
var result = {}, iteratee = keys[0];
if (obj == null) return result;
- if (_.isFunction(iteratee)) {
+ if (isFunction(iteratee)) {
if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]);
- keys = _.allKeys(obj);
+ keys = allKeys(obj);
} else {
iteratee = keyInObj;
keys = flatten(keys, false, false);
@@ -1137,49 +1134,49 @@
});
// Return a copy of the object without the blacklisted properties.
- _.omit = restArguments(function(obj, keys) {
+ export var omit = restArguments(function(obj, keys) {
var iteratee = keys[0], context;
- if (_.isFunction(iteratee)) {
- iteratee = _.negate(iteratee);
+ if (isFunction(iteratee)) {
+ iteratee = negate(iteratee);
if (keys.length > 1) context = keys[1];
} else {
- keys = _.map(flatten(keys, false, false), String);
+ keys = map(flatten(keys, false, false), String);
iteratee = function(value, key) {
- return !_.contains(keys, key);
+ return !contains(keys, key);
};
}
- return _.pick(obj, iteratee, context);
+ return pick(obj, iteratee, context);
});
// Fill in a given object with default properties.
- _.defaults = createAssigner(_.allKeys, true);
+ export var defaults = createAssigner(allKeys, true);
// Creates an object that inherits from the given prototype object.
// If additional properties are provided then they will be added to the
// created object.
- _.create = function(prototype, props) {
+ export function create(prototype, props) {
var result = baseCreate(prototype);
- if (props) _.extendOwn(result, props);
+ if (props) extendOwn(result, props);
return result;
- };
+ }
// Create a (shallow-cloned) duplicate of an object.
- _.clone = function(obj) {
- if (!_.isObject(obj)) return obj;
- return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
- };
+ export function clone(obj) {
+ if (!isObject(obj)) return obj;
+ return isArray(obj) ? obj.slice() : extend({}, obj);
+ }
// Invokes interceptor with the obj, and then returns obj.
// The primary purpose of this method is to "tap into" a method chain, in
// order to perform operations on intermediate results within the chain.
- _.tap = function(obj, interceptor) {
+ export function tap(obj, interceptor) {
interceptor(obj);
return obj;
- };
+ }
// Returns whether an object has a given set of `key:value` pairs.
- _.isMatch = function(object, attrs) {
- var keys = _.keys(attrs), length = keys.length;
+ export function isMatch(object, attrs) {
+ var keys = _keys(attrs), length = keys.length;
if (object == null) return !length;
var obj = Object(object);
for (var i = 0; i < length; i++) {
@@ -1187,12 +1184,11 @@
if (attrs[key] !== obj[key] || !(key in obj)) return false;
}
return true;
- };
+ }
// Internal recursive comparison function for `isEqual`.
- var eq, deepEq;
- eq = function(a, b, aStack, bStack) {
+ function eq(a, b, aStack, bStack) {
// Identical objects are equal. `0 === -0`, but they aren't identical.
// See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal).
if (a === b) return a !== 0 || 1 / a === 1 / b;
@@ -1204,10 +1200,10 @@
var type = typeof a;
if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;
return deepEq(a, b, aStack, bStack);
- };
+ }
// Internal recursive comparison function for `isEqual`.
- deepEq = function(a, b, aStack, bStack) {
+ function deepEq(a, b, aStack, bStack) {
// Unwrap any wrapped objects.
if (a instanceof _) a = a._wrapped;
if (b instanceof _) b = b._wrapped;
@@ -1245,8 +1241,8 @@
// Objects with different constructors are not equivalent, but `Object`s or `Array`s
// from different frames are.
var aCtor = a.constructor, bCtor = b.constructor;
- if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor &&
- _.isFunction(bCtor) && bCtor instanceof bCtor)
+ if (aCtor !== bCtor && !(isFunction(aCtor) && aCtor instanceof aCtor &&
+ isFunction(bCtor) && bCtor instanceof bCtor)
&& ('constructor' in a && 'constructor' in b)) {
return false;
}
@@ -1280,10 +1276,10 @@
}
} else {
// Deep compare objects.
- var keys = _.keys(a), key;
+ var keys = _keys(a), key;
length = keys.length;
// Ensure that both objects contain the same number of properties before comparing deep equality.
- if (_.keys(b).length !== length) return false;
+ if (_keys(b).length !== length) return false;
while (length--) {
// Deep compare each member
key = keys[length];
@@ -1294,49 +1290,61 @@
aStack.pop();
bStack.pop();
return true;
- };
+ }
// Perform a deep comparison to check if two objects are equal.
- _.isEqual = function(a, b) {
+ export function isEqual(a, b) {
return eq(a, b);
- };
+ }
// Is a given array, string, or object empty?
// An "empty" object has no enumerable own-properties.
- _.isEmpty = function(obj) {
+ export function isEmpty(obj) {
if (obj == null) return true;
- if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0;
- return _.keys(obj).length === 0;
- };
+ if (isArrayLike(obj) && (isArray(obj) || isString(obj) || isArguments(obj))) return obj.length === 0;
+ return _keys(obj).length === 0;
+ }
// Is a given value a DOM element?
- _.isElement = function(obj) {
+ export function isElement(obj) {
return !!(obj && obj.nodeType === 1);
- };
+ }
+
+ // Internal function for creating a toString-based type tester.
+ function typeTester(name) {
+ return function(obj) {
+ return toString.call(obj) === '[object ' + name + ']';
+ };
+ }
// Is a given value an array?
// Delegates to ECMA5's native Array.isArray
- _.isArray = nativeIsArray || function(obj) {
- return toString.call(obj) === '[object Array]';
- };
+ export var isArray = nativeIsArray || typeTester('Array');
// Is a given variable an object?
- _.isObject = function(obj) {
+ export function isObject(obj) {
var type = typeof obj;
return type === 'function' || type === 'object' && !!obj;
- };
+ }
// Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError, isMap, isWeakMap, isSet, isWeakSet.
- _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error', 'Symbol', 'Map', 'WeakMap', 'Set', 'WeakSet'], function(name) {
- _['is' + name] = function(obj) {
- return toString.call(obj) === '[object ' + name + ']';
- };
- });
+ export var isArguments = typeTester('Arguments');
+ export var isFunction = typeTester('Function');
+ export var isString = typeTester('String');
+ export var isNumber = typeTester('Number');
+ export var isDate = typeTester('Date');
+ export var isRegExp = typeTester('RegExp');
+ export var isError = typeTester('Error');
+ export var isSymbol = typeTester('Symbol');
+ export var isMap = typeTester('Map');
+ export var isWeakMap = typeTester('WeakMap');
+ export var isSet = typeTester('Set');
+ export var isWeakSet = typeTester('WeakSet');
// Define a fallback version of the method in browsers (ahem, IE < 9), where
// there isn't any inspectable "Arguments" type.
- if (!_.isArguments(arguments)) {
- _.isArguments = function(obj) {
+ if (!isArguments(arguments)) {
+ isArguments = function(obj) {
return has(obj, 'callee');
};
}
@@ -1345,40 +1353,43 @@
// IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).
var nodelist = root.document && root.document.childNodes;
if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {
- _.isFunction = function(obj) {
+ isFunction = function(obj) {
return typeof obj == 'function' || false;
};
}
// Is a given object a finite number?
- _.isFinite = function(obj) {
- return !_.isSymbol(obj) && isFinite(obj) && !isNaN(parseFloat(obj));
- };
+ export { _isFinite as isFinite };
+ function _isFinite(obj) {
+ return !isSymbol(obj) && isFinite(obj) && !isNaN(parseFloat(obj));
+ }
// Is the given value `NaN`?
- _.isNaN = function(obj) {
- return _.isNumber(obj) && isNaN(obj);
- };
+ export { _isNaN as isNaN };
+ function _isNaN(obj) {
+ return isNumber(obj) && isNaN(obj);
+ }
// Is a given value a boolean?
- _.isBoolean = function(obj) {
+ export function isBoolean(obj) {
return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
- };
+ }
// Is a given value equal to null?
- _.isNull = function(obj) {
+ export function isNull(obj) {
return obj === null;
- };
+ }
// Is a given variable undefined?
- _.isUndefined = function(obj) {
+ export function isUndefined(obj) {
return obj === void 0;
- };
+ }
// Shortcut function for checking if an object has a given property directly
// on itself (in other words, not on a prototype).
- _.has = function(obj, path) {
- if (!_.isArray(path)) {
+ export { _has as has };
+ function _has(obj, path) {
+ if (!isArray(path)) {
return has(obj, path);
}
var length = path.length;
@@ -1390,81 +1401,82 @@
obj = obj[key];
}
return !!length;
- };
+ }
// Utility Functions
// -----------------
// Run Underscore.js in *noConflict* mode, returning the `_` variable to its
// previous owner. Returns a reference to the Underscore object.
- _.noConflict = function() {
+ export function noConflict() {
root._ = previousUnderscore;
return this;
- };
+ }
// Keep the identity function around for default iteratees.
- _.identity = function(value) {
+ export function identity(value) {
return value;
- };
+ }
// Predicate-generating functions. Often useful outside of Underscore.
- _.constant = function(value) {
+ export function constant(value) {
return function() {
return value;
};
- };
+ }
- _.noop = function(){};
+ export function noop(){}
// Creates a function that, when passed an object, will traverse that object’s
// properties down the given `path`, specified as an array of keys or indexes.
- _.property = function(path) {
- if (!_.isArray(path)) {
+ export function property(path) {
+ if (!isArray(path)) {
return shallowProperty(path);
}
return function(obj) {
return deepGet(obj, path);
};
- };
+ }
// Generates a function for a given object that returns a given property.
- _.propertyOf = function(obj) {
+ export function propertyOf(obj) {
if (obj == null) {
return function(){};
}
return function(path) {
- return !_.isArray(path) ? obj[path] : deepGet(obj, path);
+ return !isArray(path) ? obj[path] : deepGet(obj, path);
};
- };
+ }
// Returns a predicate for checking whether an object has a given set of
// `key:value` pairs.
- _.matcher = _.matches = function(attrs) {
- attrs = _.extendOwn({}, attrs);
+ export { matcher as matches };
+ export function matcher(attrs) {
+ attrs = extendOwn({}, attrs);
return function(obj) {
- return _.isMatch(obj, attrs);
+ return isMatch(obj, attrs);
};
- };
+ }
// Run a function **n** times.
- _.times = function(n, iteratee, context) {
+ export 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;
- };
+ }
// Return a random integer between min and max (inclusive).
- _.random = function(min, max) {
+ export function random(min, max) {
if (max == null) {
max = min;
min = 0;
}
return min + Math.floor(Math.random() * (max - min + 1));
- };
+ }
// A (possibly faster) way to get the current timestamp as an integer.
- _.now = Date.now || function() {
+ export var now = Date.now || function() {
return new Date().getTime();
};
@@ -1477,33 +1489,33 @@
"'": ''',
'`': '`'
};
- var unescapeMap = _.invert(escapeMap);
+ var unescapeMap = invert(escapeMap);
// Functions for escaping and unescaping strings to/from HTML interpolation.
- var createEscaper = function(map) {
+ function createEscaper(map) {
var escaper = function(match) {
return map[match];
};
// Regexes for identifying a key that needs to be escaped.
- var source = '(?:' + _.keys(map).join('|') + ')';
+ 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;
};
- };
- _.escape = createEscaper(escapeMap);
- _.unescape = createEscaper(unescapeMap);
+ }
+ export var escape = createEscaper(escapeMap);
+ export var unescape = createEscaper(unescapeMap);
// Traverses the children of `obj` along `path`. If a child is a function, it
// is invoked with its parent as context. Returns the value of the final
// child, or `fallback` if any child is undefined.
- _.result = function(obj, path, fallback) {
- if (!_.isArray(path)) path = [path];
+ export function result(obj, path, fallback) {
+ if (!isArray(path)) path = [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]];
@@ -1511,22 +1523,22 @@
prop = fallback;
i = length; // Ensure we don't continue iterating.
}
- obj = _.isFunction(prop) ? prop.call(obj) : prop;
+ obj = isFunction(prop) ? prop.call(obj) : prop;
}
return obj;
- };
+ }
// Generate a unique integer id (unique within the entire client session).
// Useful for temporary DOM ids.
var idCounter = 0;
- _.uniqueId = function(prefix) {
+ export function uniqueId(prefix) {
var id = ++idCounter + '';
return prefix ? prefix + id : id;
- };
+ }
// By default, Underscore uses ERB-style template delimiters, change the
// following template settings to use alternative delimiters.
- _.templateSettings = {
+ export var templateSettings = _.templateSettings = {
evaluate: /<%([\s\S]+?)%>/g,
interpolate: /<%=([\s\S]+?)%>/g,
escape: /<%-([\s\S]+?)%>/g
@@ -1558,9 +1570,9 @@
// Underscore templating handles arbitrary delimiters, preserves whitespace,
// and correctly escapes quotes within interpolated code.
// NB: `oldSettings` only exists for backwards compatibility.
- _.template = function(text, settings, oldSettings) {
+ export function template(text, settings, oldSettings) {
if (!settings && oldSettings) settings = oldSettings;
- settings = _.defaults({}, settings, _.templateSettings);
+ settings = defaults({}, settings, _.templateSettings);
// Combine delimiters into one regular expression via alternation.
var matcher = RegExp([
@@ -1613,14 +1625,14 @@
template.source = 'function(' + argument + '){\n' + source + '}';
return template;
- };
+ }
// Add a "chain" function. Start chaining a wrapped Underscore object.
- _.chain = function(obj) {
+ export function chain(obj) {
var instance = _(obj);
instance._chain = true;
return instance;
- };
+ }
// OOP
// ---------------
@@ -1629,13 +1641,13 @@
// underscore functions. Wrapped objects may be chained.
// Helper function to continue chaining intermediate results.
- var chainResult = function(instance, obj) {
+ function chainResult(instance, obj) {
return instance._chain ? _(obj).chain() : obj;
- };
+ }
// Add your own custom functions to the Underscore object.
- _.mixin = function(obj) {
- _.each(_.functions(obj), function(name) {
+ export function mixin(obj) {
+ each(functions(obj), function(name) {
var func = _[name] = obj[name];
_.prototype[name] = function() {
var args = [this._wrapped];
@@ -1644,13 +1656,10 @@
};
});
return _;
- };
-
- // Add all of the Underscore functions to the wrapper object.
- _.mixin(_);
+ }
// Add all mutator Array functions to the wrapper.
- _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
+ each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
var method = ArrayProto[name];
_.prototype[name] = function() {
var obj = this._wrapped;
@@ -1661,7 +1670,7 @@
});
// Add all accessor Array functions to the wrapper.
- _.each(['concat', 'join', 'slice'], function(name) {
+ each(['concat', 'join', 'slice'], function(name) {
var method = ArrayProto[name];
_.prototype[name] = function() {
return chainResult(this, method.apply(this._wrapped, arguments));
@@ -1680,17 +1689,3 @@
_.prototype.toString = function() {
return String(this._wrapped);
};
-
- // AMD registration happens at the end for compatibility with AMD loaders
- // that may not enforce next-turn semantics on modules. Even though general
- // practice for AMD registration is to be anonymous, underscore registers
- // as a named module because, like jQuery, it is a base library that is
- // popular enough to be bundled in a third party lib, but not be part of
- // an AMD load request. Those cases could generate an error when an
- // anonymous define() is called outside of a loader request.
- if (typeof define == 'function' && define.amd) {
- define('underscore', [], function() {
- return _;
- });
- }
-}());
From c7c2ae99d89cb49574d3a0f65344dc93f2cc31de Mon Sep 17 00:00:00 2001
From: Julian Gonggrijp
Date: Tue, 25 Feb 2020 20:54:30 +0100
Subject: [PATCH 021/253] Create a bundle using rollup
Using outdated rollup version 0.59.4 because the legacy option was
removed in version 0.60.
---
package-lock.json | 321 +++++++++++++++++++++++++++++++++++-----------
package.json | 5 +-
rollup.config.js | 20 +++
underscore-umd.js | 1 +
4 files changed, 268 insertions(+), 79 deletions(-)
create mode 100644 rollup.config.js
create mode 100644 underscore-umd.js
diff --git a/package-lock.json b/package-lock.json
index 664621598..ca0b60f04 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,9 +1,21 @@
{
"name": "underscore",
- "version": "1.9.1",
+ "version": "1.9.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
+ "@types/estree": {
+ "version": "0.0.39",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz",
+ "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==",
+ "dev": true
+ },
+ "@types/node": {
+ "version": "13.7.5",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-13.7.5.tgz",
+ "integrity": "sha512-PfSBCTQhAQg6QBP4UhXgrZ/wQ3pjfwBr4sA7Aul+pC9XwGgm9ezrJF7OiC/I4Kf+7VPu/5ThKngAruqxyctZfA==",
+ "dev": true
+ },
"abbrev": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz",
@@ -23,7 +35,8 @@
"adm-zip": {
"version": "0.4.11",
"resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.11.tgz",
- "integrity": "sha512-L8vcjDTCOIJk7wFvmlEUN7AsSb8T+2JrdP7KINBjzr24TJ5Mwj590sLu3BC7zNZowvJWa/JtPmD8eJCzdtDWjA=="
+ "integrity": "sha512-L8vcjDTCOIJk7wFvmlEUN7AsSb8T+2JrdP7KINBjzr24TJ5Mwj590sLu3BC7zNZowvJWa/JtPmD8eJCzdtDWjA==",
+ "dev": true
},
"after": {
"version": "0.8.2",
@@ -35,6 +48,7 @@
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.0.tgz",
"integrity": "sha512-c+R/U5X+2zz2+UCrCFv6odQzJdoqI+YecuhnAJLa1zYaMc13zPfwMwZrr91Pd1DYNo/yPRbiM4WVf9whgwFsIg==",
+ "dev": true,
"requires": {
"es6-promisify": "^5.0.0"
}
@@ -43,6 +57,7 @@
"version": "5.5.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
"integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
+ "dev": true,
"requires": {
"co": "^4.6.0",
"fast-deep-equal": "^1.0.0",
@@ -55,6 +70,7 @@
"resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
"integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=",
"dev": true,
+ "optional": true,
"requires": {
"kind-of": "^3.0.2",
"longest": "^1.0.1",
@@ -99,6 +115,7 @@
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/archiver/-/archiver-2.1.1.tgz",
"integrity": "sha1-/2YrSnggFJSj7lRNOjP+dJZQnrw=",
+ "dev": true,
"requires": {
"archiver-utils": "^1.3.0",
"async": "^2.0.0",
@@ -114,6 +131,7 @@
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz",
"integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==",
+ "dev": true,
"requires": {
"lodash": "^4.17.10"
}
@@ -122,6 +140,7 @@
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
"integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
+ "dev": true,
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@@ -134,7 +153,8 @@
"lodash": {
"version": "4.17.10",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz",
- "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg=="
+ "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==",
+ "dev": true
}
}
},
@@ -142,6 +162,7 @@
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-1.3.0.tgz",
"integrity": "sha1-5QtMCccL89aA4y/xt5lOn52JUXQ=",
+ "dev": true,
"requires": {
"glob": "^7.0.0",
"graceful-fs": "^4.1.0",
@@ -155,6 +176,7 @@
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
"integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
+ "dev": true,
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@@ -167,7 +189,8 @@
"lodash": {
"version": "4.17.10",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz",
- "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg=="
+ "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==",
+ "dev": true
}
}
},
@@ -249,7 +272,8 @@
"asn1": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz",
- "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y="
+ "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=",
+ "dev": true
},
"assert-plus": {
"version": "0.2.0",
@@ -278,7 +302,8 @@
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
- "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
+ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
+ "dev": true
},
"atob": {
"version": "2.1.0",
@@ -295,7 +320,8 @@
"aws4": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz",
- "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w=="
+ "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==",
+ "dev": true
},
"backo2": {
"version": "1.0.2",
@@ -306,7 +332,8 @@
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
- "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
+ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
+ "dev": true
},
"base": {
"version": "0.11.2",
@@ -403,6 +430,7 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz",
"integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=",
+ "dev": true,
"optional": true,
"requires": {
"tweetnacl": "^0.14.3"
@@ -427,6 +455,7 @@
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz",
"integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==",
+ "dev": true,
"requires": {
"readable-stream": "^2.3.5",
"safe-buffer": "^5.1.1"
@@ -483,6 +512,7 @@
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -503,6 +533,7 @@
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz",
"integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==",
+ "dev": true,
"requires": {
"buffer-alloc-unsafe": "^1.1.0",
"buffer-fill": "^1.0.0"
@@ -511,17 +542,20 @@
"buffer-alloc-unsafe": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz",
- "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg=="
+ "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==",
+ "dev": true
},
"buffer-crc32": {
"version": "0.2.13",
"resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
- "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI="
+ "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=",
+ "dev": true
},
"buffer-fill": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz",
- "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw="
+ "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=",
+ "dev": true
},
"buffer-from": {
"version": "1.0.0",
@@ -724,7 +758,8 @@
"co": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
- "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ="
+ "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
+ "dev": true
},
"code-point-at": {
"version": "1.1.0",
@@ -752,6 +787,7 @@
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz",
"integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=",
+ "dev": true,
"requires": {
"delayed-stream": "~1.0.0"
}
@@ -784,6 +820,7 @@
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-1.2.2.tgz",
"integrity": "sha1-UkqfEJA/OoEzibAiXSfEi7dRiQ8=",
+ "dev": true,
"requires": {
"buffer-crc32": "^0.2.1",
"crc32-stream": "^2.0.0",
@@ -794,7 +831,8 @@
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
+ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
+ "dev": true
},
"concat-stream": {
"version": "1.6.2",
@@ -847,7 +885,8 @@
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
- "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
+ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
+ "dev": true
},
"coveralls": {
"version": "2.13.3",
@@ -865,12 +904,14 @@
"crc": {
"version": "3.5.0",
"resolved": "https://registry.npmjs.org/crc/-/crc-3.5.0.tgz",
- "integrity": "sha1-mLi6fUiWZbo5efWbITgTdBAaGWQ="
+ "integrity": "sha1-mLi6fUiWZbo5efWbITgTdBAaGWQ=",
+ "dev": true
},
"crc32-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-2.0.0.tgz",
"integrity": "sha1-483TtN8xaN10494/u8t7KX/pCPQ=",
+ "dev": true,
"requires": {
"crc": "^3.4.4",
"readable-stream": "^2.0.0"
@@ -923,6 +964,7 @@
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
"integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
+ "dev": true,
"requires": {
"assert-plus": "^1.0.0"
},
@@ -930,7 +972,8 @@
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
+ "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+ "dev": true
}
}
},
@@ -1032,7 +1075,8 @@
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
- "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
+ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
+ "dev": true
},
"depd": {
"version": "1.1.2",
@@ -1111,6 +1155,7 @@
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz",
"integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=",
+ "dev": true,
"optional": true,
"requires": {
"jsbn": "~0.1.0"
@@ -1132,6 +1177,7 @@
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
"integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==",
+ "dev": true,
"requires": {
"once": "^1.4.0"
}
@@ -1284,12 +1330,14 @@
"es6-promise": {
"version": "4.2.4",
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz",
- "integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ=="
+ "integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==",
+ "dev": true
},
"es6-promisify": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz",
"integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=",
+ "dev": true,
"requires": {
"es6-promise": "^4.0.3"
}
@@ -1598,7 +1646,8 @@
"extend": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz",
- "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ="
+ "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=",
+ "dev": true
},
"extend-shallow": {
"version": "3.0.2",
@@ -1633,17 +1682,20 @@
"extsprintf": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
- "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
+ "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
+ "dev": true
},
"fast-deep-equal": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz",
- "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ="
+ "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=",
+ "dev": true
},
"fast-json-stable-stringify": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
- "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
+ "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=",
+ "dev": true
},
"fast-levenshtein": {
"version": "1.0.7",
@@ -2113,7 +2165,8 @@
"forever-agent": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
- "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
+ "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
+ "dev": true
},
"form-data": {
"version": "2.1.4",
@@ -2138,7 +2191,8 @@
"fs-constants": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
- "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
+ "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
+ "dev": true
},
"fs-extra": {
"version": "5.0.0",
@@ -2154,7 +2208,8 @@
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
- "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
+ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
+ "dev": true
},
"fsevents": {
"version": "1.2.4",
@@ -2176,7 +2231,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"aproba": {
"version": "1.2.0",
@@ -2197,12 +2253,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -2217,17 +2275,20 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"core-util-is": {
"version": "1.0.2",
@@ -2344,7 +2405,8 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"ini": {
"version": "1.3.5",
@@ -2356,6 +2418,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -2370,6 +2433,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -2377,12 +2441,14 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"minipass": {
"version": "2.2.4",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"safe-buffer": "^5.1.1",
"yallist": "^3.0.0"
@@ -2401,6 +2467,7 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -2481,7 +2548,8 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"object-assign": {
"version": "4.1.1",
@@ -2493,6 +2561,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"wrappy": "1"
}
@@ -2578,7 +2647,8 @@
"safe-buffer": {
"version": "5.1.1",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -2614,6 +2684,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -2633,6 +2704,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -2676,12 +2748,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"yallist": {
"version": "3.0.2",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
}
}
},
@@ -2716,6 +2790,7 @@
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
"integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
+ "dev": true,
"requires": {
"assert-plus": "^1.0.0"
},
@@ -2723,7 +2798,8 @@
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
+ "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+ "dev": true
}
}
},
@@ -2822,7 +2898,8 @@
"graceful-fs": {
"version": "4.1.11",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
- "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg="
+ "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=",
+ "dev": true
},
"gzip-size": {
"version": "3.0.0",
@@ -2881,7 +2958,8 @@
"har-schema": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
- "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
+ "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=",
+ "dev": true
},
"har-validator": {
"version": "2.0.6",
@@ -3070,6 +3148,7 @@
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz",
"integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==",
+ "dev": true,
"requires": {
"agent-base": "^4.1.0",
"debug": "^3.1.0"
@@ -3079,6 +3158,7 @@
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
+ "dev": true,
"requires": {
"ms": "2.0.0"
}
@@ -3110,6 +3190,7 @@
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
+ "dev": true,
"requires": {
"once": "^1.3.0",
"wrappy": "1"
@@ -3118,7 +3199,8 @@
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
- "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
+ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
+ "dev": true
},
"ini": {
"version": "1.3.5",
@@ -3387,7 +3469,8 @@
"is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
- "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
+ "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
+ "dev": true
},
"is-utf8": {
"version": "0.2.1",
@@ -3404,7 +3487,8 @@
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
+ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+ "dev": true
},
"isbinaryfile": {
"version": "3.0.2",
@@ -3430,7 +3514,8 @@
"isstream": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
- "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
+ "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
+ "dev": true
},
"istanbul": {
"version": "0.3.22",
@@ -3497,17 +3582,20 @@
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
"integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
+ "dev": true,
"optional": true
},
"json-schema": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
- "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
+ "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=",
+ "dev": true
},
"json-schema-traverse": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
- "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A="
+ "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=",
+ "dev": true
},
"json-stable-stringify": {
"version": "1.0.1",
@@ -3521,7 +3609,8 @@
"json-stringify-safe": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
- "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
+ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
+ "dev": true
},
"json3": {
"version": "3.3.2",
@@ -3554,6 +3643,7 @@
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
"integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
+ "dev": true,
"requires": {
"assert-plus": "1.0.0",
"extsprintf": "1.3.0",
@@ -3564,7 +3654,8 @@
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
+ "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+ "dev": true
}
}
},
@@ -3631,6 +3722,7 @@
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/karma-sauce-launcher/-/karma-sauce-launcher-1.2.0.tgz",
"integrity": "sha512-lEhtGRGS+3Yw6JSx/vJY9iQyHNtTjcojrSwNzqNUOaDceKDu9dPZqA/kr69bUO9G2T6GKbu8AZgXqy94qo31Jg==",
+ "dev": true,
"requires": {
"q": "^1.5.0",
"sauce-connect-launcher": "^1.2.2",
@@ -3658,6 +3750,7 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz",
"integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=",
+ "dev": true,
"requires": {
"readable-stream": "^2.0.5"
}
@@ -4010,7 +4103,8 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
"integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=",
- "dev": true
+ "dev": true,
+ "optional": true
},
"loud-rejection": {
"version": "1.6.0",
@@ -4128,12 +4222,14 @@
"mime-db": {
"version": "1.33.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz",
- "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ=="
+ "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==",
+ "dev": true
},
"mime-types": {
"version": "2.1.18",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz",
"integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==",
+ "dev": true,
"requires": {
"mime-db": "~1.33.0"
}
@@ -4142,6 +4238,7 @@
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+ "dev": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -4177,6 +4274,7 @@
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
+ "dev": true,
"requires": {
"minimist": "0.0.8"
},
@@ -4184,14 +4282,16 @@
"minimist": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
- "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
+ "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
+ "dev": true
}
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
+ "dev": true
},
"mute-stream": {
"version": "0.0.5",
@@ -4283,6 +4383,7 @@
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
"integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
+ "dev": true,
"requires": {
"remove-trailing-separator": "^1.0.1"
}
@@ -4369,7 +4470,8 @@
"oauth-sign": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz",
- "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM="
+ "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=",
+ "dev": true
},
"object-assign": {
"version": "4.1.1",
@@ -4462,6 +4564,7 @@
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
+ "dev": true,
"requires": {
"wrappy": "1"
}
@@ -4609,7 +4712,8 @@
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
- "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
+ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
+ "dev": true
},
"path-is-inside": {
"version": "1.0.2",
@@ -4637,7 +4741,8 @@
"performance-now": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
- "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
+ "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
+ "dev": true
},
"pify": {
"version": "2.3.0",
@@ -4709,7 +4814,8 @@
"process-nextick-args": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
- "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw=="
+ "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
+ "dev": true
},
"pseudomap": {
"version": "1.0.2",
@@ -4720,12 +4826,14 @@
"punycode": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
- "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4="
+ "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
+ "dev": true
},
"q": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
- "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc="
+ "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
+ "dev": true
},
"qs": {
"version": "6.3.2",
@@ -4879,6 +4987,7 @@
"version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
+ "dev": true,
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
@@ -4944,7 +5053,8 @@
"remove-trailing-separator": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
- "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8="
+ "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=",
+ "dev": true
},
"repeat-element": {
"version": "1.1.2",
@@ -5053,6 +5163,7 @@
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",
"integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==",
+ "dev": true,
"requires": {
"glob": "^7.0.5"
},
@@ -5061,6 +5172,7 @@
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
"integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
+ "dev": true,
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@@ -5072,6 +5184,16 @@
}
}
},
+ "rollup": {
+ "version": "0.59.4",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.59.4.tgz",
+ "integrity": "sha512-ISiMqq/aJa+57QxX2MRcvLESHdJ7wSavmr6U1euMr+6UgFe6KM+3QANrYy8LQofwhTC1I7BcAdlLnDiaODs1BA==",
+ "dev": true,
+ "requires": {
+ "@types/estree": "0.0.39",
+ "@types/node": "*"
+ }
+ },
"run-async": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz",
@@ -5090,7 +5212,8 @@
"safe-buffer": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
- "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg=="
+ "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==",
+ "dev": true
},
"safe-regex": {
"version": "1.1.0",
@@ -5105,6 +5228,7 @@
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/sauce-connect-launcher/-/sauce-connect-launcher-1.2.4.tgz",
"integrity": "sha512-X2vfwulR6brUGiicXKxPm1GJ7dBEeP1II450Uv4bHGrcGOapZNgzJvn9aioea5IC5BPp/7qjKdE3xbbTBIVXMA==",
+ "dev": true,
"requires": {
"adm-zip": "~0.4.3",
"async": "^2.1.2",
@@ -5117,6 +5241,7 @@
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz",
"integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==",
+ "dev": true,
"requires": {
"lodash": "^4.17.10"
}
@@ -5124,7 +5249,8 @@
"lodash": {
"version": "4.17.10",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz",
- "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg=="
+ "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==",
+ "dev": true
}
}
},
@@ -5132,6 +5258,7 @@
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/saucelabs/-/saucelabs-1.5.0.tgz",
"integrity": "sha512-jlX3FGdWvYf4Q3LFfFWS1QvPg3IGCGWxIc8QBFdPTbpTJnt/v17FHXYVAn7C8sHf1yUXo2c7yIM0isDryfYtHQ==",
+ "dev": true,
"requires": {
"https-proxy-agent": "^2.2.1"
}
@@ -5540,12 +5667,14 @@
"sprintf-js": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
- "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
+ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
+ "dev": true
},
"sshpk": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.1.tgz",
"integrity": "sha1-Ew9Zde3a2WPx1W+SuaxsUfqfg+s=",
+ "dev": true,
"requires": {
"asn1": "~0.2.3",
"assert-plus": "^1.0.0",
@@ -5560,7 +5689,8 @@
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
+ "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+ "dev": true
}
}
},
@@ -5606,6 +5736,7 @@
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "dev": true,
"requires": {
"safe-buffer": "~5.1.0"
}
@@ -5613,7 +5744,8 @@
"stringstream": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz",
- "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA=="
+ "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==",
+ "dev": true
},
"strip-ansi": {
"version": "3.0.1",
@@ -5658,6 +5790,7 @@
"version": "1.6.1",
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.1.tgz",
"integrity": "sha512-IFLM5wp3QrJODQFPm6/to3LJZrONdBY/otxcvDIQzu217zKye6yVR3hhi9lAjrC2Z+m/j5oDxMPb1qcd8cIvpA==",
+ "dev": true,
"requires": {
"bl": "^1.0.0",
"buffer-alloc": "^1.1.0",
@@ -5698,7 +5831,8 @@
"to-buffer": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz",
- "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg=="
+ "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==",
+ "dev": true
},
"to-object-path": {
"version": "0.3.0",
@@ -5746,6 +5880,7 @@
"version": "2.3.4",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz",
"integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==",
+ "dev": true,
"requires": {
"punycode": "^1.4.1"
}
@@ -5766,6 +5901,7 @@
"version": "0.14.5",
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
"integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
+ "dev": true,
"optional": true
},
"type-check": {
@@ -5834,6 +5970,7 @@
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.4.tgz",
"integrity": "sha1-LCo/n4PmR2L9xF5s6sZRQoZCE9s=",
+ "dev": true,
"requires": {
"sprintf-js": "^1.0.3",
"util-deprecate": "^1.0.2"
@@ -5977,7 +6114,8 @@
"util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
- "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
+ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
+ "dev": true
},
"utils-merge": {
"version": "1.0.1",
@@ -5988,7 +6126,8 @@
"uuid": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz",
- "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA=="
+ "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==",
+ "dev": true
},
"validate-npm-package-license": {
"version": "3.0.3",
@@ -6003,12 +6142,14 @@
"vargs": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/vargs/-/vargs-0.1.0.tgz",
- "integrity": "sha1-a2GE2mUgzDIEzhtAfKwm2SYJ6/8="
+ "integrity": "sha1-a2GE2mUgzDIEzhtAfKwm2SYJ6/8=",
+ "dev": true
},
"verror": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
"integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
+ "dev": true,
"requires": {
"assert-plus": "^1.0.0",
"core-util-is": "1.0.2",
@@ -6018,7 +6159,8 @@
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
+ "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+ "dev": true
}
}
},
@@ -6042,6 +6184,7 @@
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/wd/-/wd-1.8.1.tgz",
"integrity": "sha512-kl8wgkD6L2VaI2ODPr6plsJuSo6jre2te4TgcMrzP3AZy5OPp76ZSsf34QmuSW1EhLqnOZ8u916wgOAYFdAj/w==",
+ "dev": true,
"requires": {
"archiver": "2.1.1",
"async": "2.0.1",
@@ -6056,12 +6199,14 @@
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
+ "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+ "dev": true
},
"async": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/async/-/async-2.0.1.tgz",
"integrity": "sha1-twnMAoCpw28J9FNr6CPIOKkEniU=",
+ "dev": true,
"requires": {
"lodash": "^4.8.0"
}
@@ -6069,12 +6214,14 @@
"aws-sign2": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
- "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
+ "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=",
+ "dev": true
},
"boom": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz",
"integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=",
+ "dev": true,
"requires": {
"hoek": "4.x.x"
}
@@ -6082,12 +6229,14 @@
"caseless": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
- "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
+ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
+ "dev": true
},
"cryptiles": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz",
"integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=",
+ "dev": true,
"requires": {
"boom": "5.x.x"
},
@@ -6096,6 +6245,7 @@
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz",
"integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==",
+ "dev": true,
"requires": {
"hoek": "4.x.x"
}
@@ -6106,6 +6256,7 @@
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz",
"integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=",
+ "dev": true,
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "1.0.6",
@@ -6116,6 +6267,7 @@
"version": "5.0.3",
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz",
"integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=",
+ "dev": true,
"requires": {
"ajv": "^5.1.0",
"har-schema": "^2.0.0"
@@ -6125,6 +6277,7 @@
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz",
"integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==",
+ "dev": true,
"requires": {
"boom": "4.x.x",
"cryptiles": "3.x.x",
@@ -6135,12 +6288,14 @@
"hoek": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz",
- "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA=="
+ "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==",
+ "dev": true
},
"http-signature": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
"integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
+ "dev": true,
"requires": {
"assert-plus": "^1.0.0",
"jsprim": "^1.2.2",
@@ -6150,22 +6305,26 @@
"lodash": {
"version": "4.17.10",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz",
- "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg=="
+ "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==",
+ "dev": true
},
"q": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz",
- "integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4="
+ "integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4=",
+ "dev": true
},
"qs": {
"version": "6.5.2",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
- "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
+ "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
+ "dev": true
},
"request": {
"version": "2.85.0",
"resolved": "https://registry.npmjs.org/request/-/request-2.85.0.tgz",
"integrity": "sha512-8H7Ehijd4js+s6wuVPLjwORxD4zeuyjYugprdOXlPSqaApmL/QOy+EB/beICHVCHkGMKNh5rvihb5ov+IDw4mg==",
+ "dev": true,
"requires": {
"aws-sign2": "~0.7.0",
"aws4": "^1.6.0",
@@ -6195,6 +6354,7 @@
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz",
"integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==",
+ "dev": true,
"requires": {
"hoek": "4.x.x"
}
@@ -6203,6 +6363,7 @@
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
"integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
+ "dev": true,
"requires": {
"safe-buffer": "^5.0.1"
}
@@ -6244,7 +6405,8 @@
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
+ "dev": true
},
"write": {
"version": "0.2.1",
@@ -6286,7 +6448,8 @@
"xtend": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
- "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68="
+ "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
+ "dev": true
},
"y18n": {
"version": "3.2.1",
@@ -6323,6 +6486,7 @@
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-1.2.0.tgz",
"integrity": "sha1-qLxF9MG0lpnGuQGYuqyqzbzUugQ=",
+ "dev": true,
"requires": {
"archiver-utils": "^1.3.0",
"compress-commons": "^1.2.0",
@@ -6333,7 +6497,8 @@
"lodash": {
"version": "4.17.10",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz",
- "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg=="
+ "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==",
+ "dev": true
}
}
}
diff --git a/package.json b/package.json
index cec85d47f..305f7d8a3 100644
--- a/package.json
+++ b/package.json
@@ -15,6 +15,7 @@
"url": "git://github.com/jashkenas/underscore.git"
},
"main": "underscore.js",
+ "module": "underscore-module.js",
"version": "1.9.2",
"devDependencies": {
"coveralls": "^2.11.2",
@@ -26,8 +27,9 @@
"karma-sauce-launcher": "^1.2.0",
"nyc": "^2.1.3",
"pretty-bytes-cli": "^1.0.0",
- "qunit-cli": "~0.2.0",
"qunit": "^2.6.0",
+ "qunit-cli": "~0.2.0",
+ "rollup": "^0.59.4",
"uglify-js": "3.3.21"
},
"scripts": {
@@ -37,6 +39,7 @@
"lint": "eslint underscore.js test/*.js",
"test-node": "qunit-cli test/*.js",
"test-browser": "npm i karma-phantomjs-launcher && karma start",
+ "bundle": "rollup --config",
"minify": "uglifyjs underscore.js -c \"evaluate=false\" --comments \"/ .*/\" -m",
"build": "npm run minify -- --source-map --source-map-url \" \" -o underscore-min.js",
"doc": "docco underscore.js",
diff --git a/rollup.config.js b/rollup.config.js
new file mode 100644
index 000000000..dd45cd427
--- /dev/null
+++ b/rollup.config.js
@@ -0,0 +1,20 @@
+module.exports = {
+ input: 'underscore-umd.js',
+ treeshake: false,
+ context: 'this',
+ output: {
+ file: 'underscore.js',
+ format: 'umd',
+ legacy: true,
+ strict: false,
+ name: '_',
+ sourcemap: true,
+ sourcemapExcludeSources: true,
+ amd: {
+ id: 'underscore',
+ },
+ exports: 'default',
+ externalLiveBindings: false,
+ freeze: false,
+ },
+};
diff --git a/underscore-umd.js b/underscore-umd.js
new file mode 100644
index 000000000..e3a7725fc
--- /dev/null
+++ b/underscore-umd.js
@@ -0,0 +1 @@
+export { default } from './underscore-module';
From 9960f08ddfc45bc880eda63e8a8dd51d1e5f4f14 Mon Sep 17 00:00:00 2001
From: Julian Gonggrijp
Date: Wed, 26 Feb 2020 02:20:49 +0100
Subject: [PATCH 022/253] Add tests to evaluate the effect on tree-shaking
---
.gitignore | 1 +
package.json | 1 +
test-treeshake/map.js | 1 +
test-treeshake/rollup.config.js | 15 +++++++++++
test-treeshake/template.js | 1 +
test/treeshake.js | 48 +++++++++++++++++++++++++++++++++
6 files changed, 67 insertions(+)
create mode 100644 test-treeshake/map.js
create mode 100644 test-treeshake/rollup.config.js
create mode 100644 test-treeshake/template.js
create mode 100644 test/treeshake.js
diff --git a/.gitignore b/.gitignore
index ab5b5c583..40ef2de14 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@ node_modules
*.swp
nyc_output
coverage
+test-treeshake/*-umd.js
diff --git a/package.json b/package.json
index 305f7d8a3..d793f5bfa 100644
--- a/package.json
+++ b/package.json
@@ -40,6 +40,7 @@
"test-node": "qunit-cli test/*.js",
"test-browser": "npm i karma-phantomjs-launcher && karma start",
"bundle": "rollup --config",
+ "bundle-treeshake": "cd test-treeshake && npx rollup@latest --config",
"minify": "uglifyjs underscore.js -c \"evaluate=false\" --comments \"/ .*/\" -m",
"build": "npm run minify -- --source-map --source-map-url \" \" -o underscore-min.js",
"doc": "docco underscore.js",
diff --git a/test-treeshake/map.js b/test-treeshake/map.js
new file mode 100644
index 000000000..59f3847b8
--- /dev/null
+++ b/test-treeshake/map.js
@@ -0,0 +1 @@
+export { map } from '../underscore-source';
diff --git a/test-treeshake/rollup.config.js b/test-treeshake/rollup.config.js
new file mode 100644
index 000000000..2c04f3a20
--- /dev/null
+++ b/test-treeshake/rollup.config.js
@@ -0,0 +1,15 @@
+module.exports = [{
+ input: 'map.js',
+ output: {
+ file: 'map-umd.js',
+ format: 'umd',
+ name: 'map',
+ },
+}, {
+ input: 'template.js',
+ output: {
+ file: 'template-umd.js',
+ format: 'umd',
+ name: 'template',
+ },
+}];
diff --git a/test-treeshake/template.js b/test-treeshake/template.js
new file mode 100644
index 000000000..30a970b35
--- /dev/null
+++ b/test-treeshake/template.js
@@ -0,0 +1 @@
+export { template } from '../underscore-module';
diff --git a/test/treeshake.js b/test/treeshake.js
new file mode 100644
index 000000000..23a95ded0
--- /dev/null
+++ b/test/treeshake.js
@@ -0,0 +1,48 @@
+(function() {
+ // Tests in this module only work in the node.js environment.
+ if (typeof require !== 'function') return;
+
+ var fixturePrefix = __dirname + '/../test-treeshake/';
+ var moduleName = __dirname + '/../underscore.js';
+ var fs = require('fs');
+
+ QUnit.module('Tree-shaking');
+
+ QUnit.test('should have an effect', function(assert) {
+ var done = assert.async();
+ var fixtureName = fixturePrefix + 'map-umd.js';
+ fs.stat(moduleName, function(error, moduleStats) {
+ assert.equal(error, null);
+ if (error) return done();
+ fs.stat(fixtureName, function(error, fixtureStats) {
+ assert.equal(error, null);
+ if (error) return done();
+ // _.template depends on the entire underscore object, so all of the
+ // source code should be included.
+ assert.ok(fixtureStats.size < moduleStats.size);
+ done();
+ });
+ });
+ });
+
+ QUnit.test('should not be overzealous', function(assert) {
+ var done = assert.async();
+ var fixtureName = fixturePrefix + 'template-umd.js';
+ fs.readFile(moduleName, {encoding: 'utf8'}, function(error, moduleData) {
+ assert.equal(error, null);
+ if (error) return done();
+ fs.readFile(fixtureName, {encoding: 'utf8'}, function(error, fixtureData) {
+ assert.equal(error, null);
+ if (error) return done();
+ var moduleLines = moduleData.split('\n').length,
+ fixtureLines = fixtureData.split('\n').length;
+ // _.template depends on the entire underscore object, so all of the
+ // source code should be included. Allowing for up to 4 lines of
+ // difference; this is the size of the noConflict logic, which is
+ // present in the official module but not in the fixture.
+ assert.ok(moduleLines - fixtureLines <= 4);
+ done();
+ });
+ });
+ });
+}());
From 9c78ddbdac9339ebce31e341951659cfe0afa20a Mon Sep 17 00:00:00 2001
From: Julian Gonggrijp
Date: Wed, 26 Feb 2020 02:27:23 +0100
Subject: [PATCH 023/253] Integrate the rollup bundling into the other
package.json commands
---
package.json | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/package.json b/package.json
index d793f5bfa..2b34d75e5 100644
--- a/package.json
+++ b/package.json
@@ -36,15 +36,16 @@
"test": "npm run lint && npm run test-node",
"coverage": "nyc npm run test-node && nyc report",
"coveralls": "nyc npm run test-node && nyc report --reporter=text-lcov | coveralls",
- "lint": "eslint underscore.js test/*.js",
- "test-node": "qunit-cli test/*.js",
- "test-browser": "npm i karma-phantomjs-launcher && karma start",
+ "lint": "eslint underscore-{source,module,umd}.js test/*.js",
+ "test-node": "npm run prepare-tests && qunit-cli test/*.js",
+ "test-browser": "npm run prepare-tests && npm i karma-phantomjs-launcher && karma start",
"bundle": "rollup --config",
"bundle-treeshake": "cd test-treeshake && npx rollup@latest --config",
+ "prepare-tests": "npm run bundle && npm run bundle-treeshake",
"minify": "uglifyjs underscore.js -c \"evaluate=false\" --comments \"/ .*/\" -m",
- "build": "npm run minify -- --source-map --source-map-url \" \" -o underscore-min.js",
- "doc": "docco underscore.js",
- "weight": "npm run minify | gzip-size | pretty-bytes"
+ "build": "npm run bundle && npm run minify -- --source-map content=underscore.js.map --source-map-url \" \" -o underscore-min.js",
+ "doc": "npm run bundle && docco underscore-source.js underscore-module.js",
+ "weight": "npm run bundle && npm run minify | gzip-size | pretty-bytes"
},
"license": "MIT",
"files": [
From 7043ce3581c4394802be670fed2b12bc8be9c21b Mon Sep 17 00:00:00 2001
From: Julian Gonggrijp
Date: Wed, 26 Feb 2020 13:51:38 +0100
Subject: [PATCH 024/253] Delegate noConflict to rollup
---
rollup.config.js | 11 ++++++-----
test/utility.js | 4 ++--
underscore-source.js | 10 ----------
3 files changed, 8 insertions(+), 17 deletions(-)
diff --git a/rollup.config.js b/rollup.config.js
index dd45cd427..3f26368b5 100644
--- a/rollup.config.js
+++ b/rollup.config.js
@@ -4,16 +4,17 @@ module.exports = {
context: 'this',
output: {
file: 'underscore.js',
+ exports: 'default',
format: 'umd',
- legacy: true,
- strict: false,
name: '_',
- sourcemap: true,
- sourcemapExcludeSources: true,
amd: {
id: 'underscore',
},
- exports: 'default',
+ noConflict: true,
+ sourcemap: true,
+ sourcemapExcludeSources: true,
+ legacy: true,
+ strict: false,
externalLiveBindings: false,
freeze: false,
},
diff --git a/test/utility.js b/test/utility.js
index b4030c198..ea156138d 100644
--- a/test/utility.js
+++ b/test/utility.js
@@ -14,8 +14,8 @@
});
- if (typeof this == 'object') {
- QUnit.test('noConflict', function(assert) {
+ if (typeof require != 'function') {
+ QUnit.test('noConflict (browser)', function(assert) {
var underscore = _.noConflict();
assert.strictEqual(underscore.identity(1), 1);
if (typeof require != 'function') {
diff --git a/underscore-source.js b/underscore-source.js
index 4c84e0adc..9a0aaa5ce 100644
--- a/underscore-source.js
+++ b/underscore-source.js
@@ -18,9 +18,6 @@
this ||
{};
- // Save the previous value of the `_` variable.
- var previousUnderscore = root._;
-
// Save bytes in the minified (but not gzipped) version:
var ArrayProto = Array.prototype, ObjProto = Object.prototype;
var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;
@@ -1406,13 +1403,6 @@
// Utility Functions
// -----------------
- // Run Underscore.js in *noConflict* mode, returning the `_` variable to its
- // previous owner. Returns a reference to the Underscore object.
- export function noConflict() {
- root._ = previousUnderscore;
- return this;
- }
-
// Keep the identity function around for default iteratees.
export function identity(value) {
return value;
From 5a72b0883e4a4ef008df8d6df7eede6e152813b6 Mon Sep 17 00:00:00 2001
From: Julian Gonggrijp
Date: Wed, 26 Feb 2020 14:49:28 +0100
Subject: [PATCH 025/253] Fix linting
---
.eslintrc | 12 +-
docs/.eslintrc | 4 +-
package-lock.json | 1984 +++++++++++++++++++++++++++++----------------
package.json | 3 +-
test/.eslintrc | 1 +
5 files changed, 1295 insertions(+), 709 deletions(-)
diff --git a/.eslintrc b/.eslintrc
index 6aa275a7d..4466054f3 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -3,5 +3,15 @@
"browser": true,
"node": true,
"amd": true
- }
+ },
+ "parserOptions": {
+ "ecmaVersion": 6,
+ "sourceType": "module",
+ },
+ "plugins": [
+ "import"
+ ],
+ "extends": [
+ "plugin:import/errors"
+ ]
}
diff --git a/docs/.eslintrc b/docs/.eslintrc
index aac42a91c..0c3c9c9e2 100644
--- a/docs/.eslintrc
+++ b/docs/.eslintrc
@@ -1,5 +1,7 @@
{
"globals": {
- "_": true
+ "_": true,
+ "parserOptions": {},
+ "rules": [],
}
}
diff --git a/package-lock.json b/package-lock.json
index ca0b60f04..93430813f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -4,6 +4,63 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
+ "@babel/code-frame": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz",
+ "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==",
+ "dev": true,
+ "requires": {
+ "@babel/highlight": "^7.8.3"
+ }
+ },
+ "@babel/highlight": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz",
+ "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==",
+ "dev": true,
+ "requires": {
+ "chalk": "^2.0.0",
+ "esutils": "^2.0.2",
+ "js-tokens": "^4.0.0"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ }
+ },
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ }
+ }
+ },
"@types/estree": {
"version": "0.0.39",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz",
@@ -32,6 +89,18 @@
"negotiator": "0.6.1"
}
},
+ "acorn": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz",
+ "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==",
+ "dev": true
+ },
+ "acorn-jsx": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz",
+ "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==",
+ "dev": true
+ },
"adm-zip": {
"version": "0.4.11",
"resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.11.tgz",
@@ -84,10 +153,13 @@
"dev": true
},
"ansi-escapes": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz",
- "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=",
- "dev": true
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.0.tgz",
+ "integrity": "sha512-EiYhwo0v255HUL6eDyuLrXEkTi7WwVCLAw+SeOQ7M7qdun1z1pum4DEm/nuqIVbPvi9RPPc9k9LbyBv6H0DwVg==",
+ "dev": true,
+ "requires": {
+ "type-fest": "^0.8.1"
+ }
},
"ansi-regex": {
"version": "2.1.1",
@@ -230,25 +302,21 @@
"integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=",
"dev": true
},
- "array-slice": {
- "version": "0.2.3",
- "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz",
- "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=",
- "dev": true
- },
- "array-union": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
- "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=",
+ "array-includes": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz",
+ "integrity": "sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ==",
"dev": true,
"requires": {
- "array-uniq": "^1.0.1"
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.0",
+ "is-string": "^1.0.5"
}
},
- "array-uniq": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz",
- "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=",
+ "array-slice": {
+ "version": "0.2.3",
+ "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz",
+ "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=",
"dev": true
},
"array-unique": {
@@ -257,18 +325,22 @@
"integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=",
"dev": true
},
+ "array.prototype.flat": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz",
+ "integrity": "sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.0-next.1"
+ }
+ },
"arraybuffer.slice": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz",
"integrity": "sha1-8zshWfBTKj8xB6JywMz70a0peco=",
"dev": true
},
- "arrify": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
- "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
- "dev": true
- },
"asn1": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz",
@@ -287,6 +359,12 @@
"integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=",
"dev": true
},
+ "astral-regex": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz",
+ "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==",
+ "dev": true
+ },
"async": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
@@ -557,12 +635,6 @@
"integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=",
"dev": true
},
- "buffer-from": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.0.0.tgz",
- "integrity": "sha512-83apNb8KK0Se60UE1+4Ukbe3HbfELJ6UlI4ldtOGs7So4KD26orJM8hIY9lxdzP+UpItH1Yh/Y8GUvNFWFFRxA==",
- "dev": true
- },
"builtin-modules": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
@@ -612,6 +684,12 @@
"integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=",
"dev": true
},
+ "callsites": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
+ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
+ "dev": true
+ },
"camelcase": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
@@ -667,6 +745,12 @@
"supports-color": "^2.0.0"
}
},
+ "chardet": {
+ "version": "0.7.0",
+ "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz",
+ "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==",
+ "dev": true
+ },
"chokidar": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz",
@@ -684,12 +768,6 @@
"readdirp": "^2.0.0"
}
},
- "circular-json": {
- "version": "0.3.3",
- "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz",
- "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==",
- "dev": true
- },
"class-utils": {
"version": "0.3.6",
"resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
@@ -720,18 +798,18 @@
}
},
"cli-cursor": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz",
- "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
+ "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",
"dev": true,
"requires": {
- "restore-cursor": "^1.0.1"
+ "restore-cursor": "^3.1.0"
}
},
"cli-width": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-1.1.1.tgz",
- "integrity": "sha1-pNKT72frt7iNSk1CwMzwDE0eNm0=",
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz",
+ "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=",
"dev": true
},
"cliui": {
@@ -777,6 +855,21 @@
"object-visit": "^1.0.0"
}
},
+ "color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "dev": true,
+ "requires": {
+ "color-name": "1.1.3"
+ }
+ },
+ "color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+ "dev": true
+ },
"colors": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/colors/-/colors-1.2.1.tgz",
@@ -834,18 +927,6 @@
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true
},
- "concat-stream": {
- "version": "1.6.2",
- "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
- "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
- "dev": true,
- "requires": {
- "buffer-from": "^1.0.0",
- "inherits": "^2.0.3",
- "readable-stream": "^2.2.2",
- "typedarray": "^0.0.6"
- }
- },
"connect": {
"version": "3.6.6",
"resolved": "https://registry.npmjs.org/connect/-/connect-3.6.6.tgz",
@@ -858,6 +939,12 @@
"utils-merge": "1.0.1"
}
},
+ "contains-path": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz",
+ "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=",
+ "dev": true
+ },
"content-type": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
@@ -951,15 +1038,6 @@
"integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=",
"dev": true
},
- "d": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz",
- "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=",
- "dev": true,
- "requires": {
- "es5-ext": "^0.10.9"
- }
- },
"dashdash": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
@@ -1004,6 +1082,15 @@
"integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=",
"dev": true
},
+ "define-properties": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
+ "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
+ "dev": true,
+ "requires": {
+ "object-keys": "^1.0.12"
+ }
+ },
"define-property": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
@@ -1057,21 +1144,6 @@
}
}
},
- "del": {
- "version": "2.2.2",
- "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz",
- "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=",
- "dev": true,
- "requires": {
- "globby": "^5.0.0",
- "is-path-cwd": "^1.0.0",
- "is-path-in-cwd": "^1.0.0",
- "object-assign": "^4.0.1",
- "pify": "^2.0.0",
- "pinkie-promise": "^2.0.0",
- "rimraf": "^2.2.8"
- }
- },
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
@@ -1110,27 +1182,12 @@
}
},
"doctrine": {
- "version": "0.7.2",
- "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-0.7.2.tgz",
- "integrity": "sha1-fLhgNZujvpDgQLJrcpzkv6ZUxSM=",
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
+ "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==",
"dev": true,
"requires": {
- "esutils": "^1.1.6",
- "isarray": "0.0.1"
- },
- "dependencies": {
- "esutils": {
- "version": "1.1.6",
- "resolved": "https://registry.npmjs.org/esutils/-/esutils-1.1.6.tgz",
- "integrity": "sha1-wBzKqa5LiXxtDD4hCuUvPHqEQ3U=",
- "dev": true
- },
- "isarray": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
- "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
- "dev": true
- }
+ "esutils": "^2.0.2"
}
},
"dom-serialize": {
@@ -1167,6 +1224,12 @@
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=",
"dev": true
},
+ "emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "dev": true
+ },
"encodeurl": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
@@ -1291,40 +1354,34 @@
"is-arrayish": "^0.2.1"
}
},
- "es5-ext": {
- "version": "0.10.42",
- "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.42.tgz",
- "integrity": "sha512-AJxO1rmPe1bDEfSR6TJ/FgMFYuTBhR5R57KW58iCkYACMyFbrkqVyzXSurYoScDGvgyMpk7uRF/lPUPPTmsRSA==",
- "dev": true,
- "requires": {
- "es6-iterator": "~2.0.3",
- "es6-symbol": "~3.1.1",
- "next-tick": "1"
- }
- },
- "es6-iterator": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
- "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=",
+ "es-abstract": {
+ "version": "1.17.4",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.4.tgz",
+ "integrity": "sha512-Ae3um/gb8F0mui/jPL+QiqmglkUsaQf7FwBEHYIFkztkneosu9imhqHpBzQ3h1vit8t5iQ74t6PEVvphBZiuiQ==",
"dev": true,
"requires": {
- "d": "1",
- "es5-ext": "^0.10.35",
- "es6-symbol": "^3.1.1"
+ "es-to-primitive": "^1.2.1",
+ "function-bind": "^1.1.1",
+ "has": "^1.0.3",
+ "has-symbols": "^1.0.1",
+ "is-callable": "^1.1.5",
+ "is-regex": "^1.0.5",
+ "object-inspect": "^1.7.0",
+ "object-keys": "^1.1.1",
+ "object.assign": "^4.1.0",
+ "string.prototype.trimleft": "^2.1.1",
+ "string.prototype.trimright": "^2.1.1"
}
},
- "es6-map": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz",
- "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=",
+ "es-to-primitive": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
+ "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
"dev": true,
"requires": {
- "d": "1",
- "es5-ext": "~0.10.14",
- "es6-iterator": "~2.0.1",
- "es6-set": "~0.1.5",
- "es6-symbol": "~3.1.1",
- "event-emitter": "~0.3.5"
+ "is-callable": "^1.1.4",
+ "is-date-object": "^1.0.1",
+ "is-symbol": "^1.0.2"
}
},
"es6-promise": {
@@ -1342,41 +1399,6 @@
"es6-promise": "^4.0.3"
}
},
- "es6-set": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz",
- "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=",
- "dev": true,
- "requires": {
- "d": "1",
- "es5-ext": "~0.10.14",
- "es6-iterator": "~2.0.1",
- "es6-symbol": "3.1.1",
- "event-emitter": "~0.3.5"
- }
- },
- "es6-symbol": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz",
- "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=",
- "dev": true,
- "requires": {
- "d": "1",
- "es5-ext": "~0.10.14"
- }
- },
- "es6-weak-map": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz",
- "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=",
- "dev": true,
- "requires": {
- "d": "1",
- "es5-ext": "^0.10.14",
- "es6-iterator": "^2.0.1",
- "es6-symbol": "^3.1.1"
- }
- },
"escape-html": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
@@ -1440,83 +1462,423 @@
}
}
},
- "escope": {
- "version": "3.6.0",
- "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz",
- "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=",
+ "eslint": {
+ "version": "6.8.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz",
+ "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "^7.0.0",
+ "ajv": "^6.10.0",
+ "chalk": "^2.1.0",
+ "cross-spawn": "^6.0.5",
+ "debug": "^4.0.1",
+ "doctrine": "^3.0.0",
+ "eslint-scope": "^5.0.0",
+ "eslint-utils": "^1.4.3",
+ "eslint-visitor-keys": "^1.1.0",
+ "espree": "^6.1.2",
+ "esquery": "^1.0.1",
+ "esutils": "^2.0.2",
+ "file-entry-cache": "^5.0.1",
+ "functional-red-black-tree": "^1.0.1",
+ "glob-parent": "^5.0.0",
+ "globals": "^12.1.0",
+ "ignore": "^4.0.6",
+ "import-fresh": "^3.0.0",
+ "imurmurhash": "^0.1.4",
+ "inquirer": "^7.0.0",
+ "is-glob": "^4.0.0",
+ "js-yaml": "^3.13.1",
+ "json-stable-stringify-without-jsonify": "^1.0.1",
+ "levn": "^0.3.0",
+ "lodash": "^4.17.14",
+ "minimatch": "^3.0.4",
+ "mkdirp": "^0.5.1",
+ "natural-compare": "^1.4.0",
+ "optionator": "^0.8.3",
+ "progress": "^2.0.0",
+ "regexpp": "^2.0.1",
+ "semver": "^6.1.2",
+ "strip-ansi": "^5.2.0",
+ "strip-json-comments": "^3.0.1",
+ "table": "^5.2.3",
+ "text-table": "^0.2.0",
+ "v8-compile-cache": "^2.0.3"
+ },
+ "dependencies": {
+ "ajv": {
+ "version": "6.12.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz",
+ "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ }
+ },
+ "ansi-regex": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+ "dev": true
+ },
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ }
+ },
+ "cross-spawn": {
+ "version": "6.0.5",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
+ "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
+ "dev": true,
+ "requires": {
+ "nice-try": "^1.0.4",
+ "path-key": "^2.0.1",
+ "semver": "^5.5.0",
+ "shebang-command": "^1.2.0",
+ "which": "^1.2.9"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "dev": true
+ }
+ }
+ },
+ "debug": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+ "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
+ "dev": true,
+ "requires": {
+ "ms": "^2.1.1"
+ }
+ },
+ "esprima": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
+ "dev": true
+ },
+ "fast-deep-equal": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz",
+ "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==",
+ "dev": true
+ },
+ "glob-parent": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz",
+ "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==",
+ "dev": true,
+ "requires": {
+ "is-glob": "^4.0.1"
+ }
+ },
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "dev": true
+ },
+ "is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
+ "dev": true
+ },
+ "is-glob": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
+ "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
+ "dev": true,
+ "requires": {
+ "is-extglob": "^2.1.1"
+ }
+ },
+ "js-yaml": {
+ "version": "3.13.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
+ "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
+ "dev": true,
+ "requires": {
+ "argparse": "^1.0.7",
+ "esprima": "^4.0.0"
+ }
+ },
+ "json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true
+ },
+ "levn": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
+ "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
+ "dev": true,
+ "requires": {
+ "prelude-ls": "~1.1.2",
+ "type-check": "~0.3.2"
+ }
+ },
+ "lodash": {
+ "version": "4.17.15",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
+ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
+ "dev": true
+ },
+ "ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
+ },
+ "progress": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
+ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
+ "dev": true
+ },
+ "semver": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+ "dev": true
+ },
+ "strip-ansi": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^4.1.0"
+ }
+ },
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ }
+ }
+ },
+ "eslint-import-resolver-node": {
+ "version": "0.3.3",
+ "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.3.tgz",
+ "integrity": "sha512-b8crLDo0M5RSe5YG8Pu2DYBj71tSB6OvXkfzwbJU2w7y8P4/yo0MyF8jU26IEuEuHF2K5/gcAJE3LhQGqBBbVg==",
"dev": true,
"requires": {
- "es6-map": "^0.1.3",
- "es6-weak-map": "^2.0.1",
- "esrecurse": "^4.1.0",
- "estraverse": "^4.1.1"
+ "debug": "^2.6.9",
+ "resolve": "^1.13.1"
+ },
+ "dependencies": {
+ "path-parse": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
+ "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
+ "dev": true
+ },
+ "resolve": {
+ "version": "1.15.1",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz",
+ "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==",
+ "dev": true,
+ "requires": {
+ "path-parse": "^1.0.6"
+ }
+ }
}
},
- "eslint": {
- "version": "1.10.3",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-1.10.3.tgz",
- "integrity": "sha1-+xmpGxPBWAgrvKKUsX2Xm8g1Ogo=",
+ "eslint-module-utils": {
+ "version": "2.5.2",
+ "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.5.2.tgz",
+ "integrity": "sha512-LGScZ/JSlqGKiT8OC+cYRxseMjyqt6QO54nl281CK93unD89ijSeRV6An8Ci/2nvWVKe8K/Tqdm75RQoIOCr+Q==",
"dev": true,
"requires": {
- "chalk": "^1.0.0",
- "concat-stream": "^1.4.6",
- "debug": "^2.1.1",
- "doctrine": "^0.7.1",
- "escape-string-regexp": "^1.0.2",
- "escope": "^3.3.0",
- "espree": "^2.2.4",
- "estraverse": "^4.1.1",
- "estraverse-fb": "^1.3.1",
- "esutils": "^2.0.2",
- "file-entry-cache": "^1.1.1",
- "glob": "^5.0.14",
- "globals": "^8.11.0",
- "handlebars": "^4.0.0",
- "inquirer": "^0.11.0",
- "is-my-json-valid": "^2.10.0",
- "is-resolvable": "^1.0.0",
- "js-yaml": "3.4.5",
- "json-stable-stringify": "^1.0.0",
- "lodash.clonedeep": "^3.0.1",
- "lodash.merge": "^3.3.2",
- "lodash.omit": "^3.1.0",
- "minimatch": "^3.0.0",
- "mkdirp": "^0.5.0",
- "object-assign": "^4.0.1",
- "optionator": "^0.6.0",
- "path-is-absolute": "^1.0.0",
- "path-is-inside": "^1.0.1",
- "shelljs": "^0.5.3",
- "strip-json-comments": "~1.0.1",
- "text-table": "~0.2.0",
- "user-home": "^2.0.0",
- "xml-escape": "~1.0.0"
+ "debug": "^2.6.9",
+ "pkg-dir": "^2.0.0"
+ }
+ },
+ "eslint-plugin-import": {
+ "version": "2.20.1",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.1.tgz",
+ "integrity": "sha512-qQHgFOTjguR+LnYRoToeZWT62XM55MBVXObHM6SKFd1VzDcX/vqT1kAz8ssqigh5eMj8qXcRoXXGZpPP6RfdCw==",
+ "dev": true,
+ "requires": {
+ "array-includes": "^3.0.3",
+ "array.prototype.flat": "^1.2.1",
+ "contains-path": "^0.1.0",
+ "debug": "^2.6.9",
+ "doctrine": "1.5.0",
+ "eslint-import-resolver-node": "^0.3.2",
+ "eslint-module-utils": "^2.4.1",
+ "has": "^1.0.3",
+ "minimatch": "^3.0.4",
+ "object.values": "^1.1.0",
+ "read-pkg-up": "^2.0.0",
+ "resolve": "^1.12.0"
},
"dependencies": {
- "espree": {
- "version": "2.2.5",
- "resolved": "https://registry.npmjs.org/espree/-/espree-2.2.5.tgz",
- "integrity": "sha1-32kbkxCIlAKuspzAZnCMVmkLhUs=",
+ "doctrine": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz",
+ "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=",
+ "dev": true,
+ "requires": {
+ "esutils": "^2.0.2",
+ "isarray": "^1.0.0"
+ }
+ },
+ "find-up": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
+ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
+ "dev": true,
+ "requires": {
+ "locate-path": "^2.0.0"
+ }
+ },
+ "load-json-file": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
+ "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.1.2",
+ "parse-json": "^2.2.0",
+ "pify": "^2.0.0",
+ "strip-bom": "^3.0.0"
+ }
+ },
+ "path-parse": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
+ "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
"dev": true
},
- "js-yaml": {
- "version": "3.4.5",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.4.5.tgz",
- "integrity": "sha1-w0A3l98SuRhmV08t4jZG/oyvtE0=",
+ "path-type": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz",
+ "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=",
+ "dev": true,
+ "requires": {
+ "pify": "^2.0.0"
+ }
+ },
+ "read-pkg": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz",
+ "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=",
+ "dev": true,
+ "requires": {
+ "load-json-file": "^2.0.0",
+ "normalize-package-data": "^2.3.2",
+ "path-type": "^2.0.0"
+ }
+ },
+ "read-pkg-up": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz",
+ "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=",
+ "dev": true,
+ "requires": {
+ "find-up": "^2.0.0",
+ "read-pkg": "^2.0.0"
+ }
+ },
+ "resolve": {
+ "version": "1.15.1",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz",
+ "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==",
"dev": true,
"requires": {
- "argparse": "^1.0.2",
- "esprima": "^2.6.0"
+ "path-parse": "^1.0.6"
}
+ },
+ "strip-bom": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
+ "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
+ "dev": true
}
}
},
+ "eslint-scope": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz",
+ "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==",
+ "dev": true,
+ "requires": {
+ "esrecurse": "^4.1.0",
+ "estraverse": "^4.1.1"
+ }
+ },
+ "eslint-utils": {
+ "version": "1.4.3",
+ "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz",
+ "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==",
+ "dev": true,
+ "requires": {
+ "eslint-visitor-keys": "^1.1.0"
+ }
+ },
+ "eslint-visitor-keys": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz",
+ "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==",
+ "dev": true
+ },
+ "espree": {
+ "version": "6.1.2",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-6.1.2.tgz",
+ "integrity": "sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA==",
+ "dev": true,
+ "requires": {
+ "acorn": "^7.1.0",
+ "acorn-jsx": "^5.1.0",
+ "eslint-visitor-keys": "^1.1.0"
+ }
+ },
"esprima": {
"version": "2.7.3",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz",
"integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=",
"dev": true
},
+ "esquery": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.1.0.tgz",
+ "integrity": "sha512-MxYW9xKmROWF672KqjO75sszsA8Mxhw06YFeS5VHlB98KDHbOSurm3ArsjO60Eaf3QmGMCP1yn+0JQkNLo/97Q==",
+ "dev": true,
+ "requires": {
+ "estraverse": "^4.0.0"
+ }
+ },
"esrecurse": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz",
@@ -1527,15 +1889,9 @@
}
},
"estraverse": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz",
- "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=",
- "dev": true
- },
- "estraverse-fb": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/estraverse-fb/-/estraverse-fb-1.3.2.tgz",
- "integrity": "sha1-0yOky15awzHOoDNBOpJT4WQ+B8Q=",
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
+ "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
"dev": true
},
"esutils": {
@@ -1544,16 +1900,6 @@
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
"dev": true
},
- "event-emitter": {
- "version": "0.3.5",
- "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz",
- "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=",
- "dev": true,
- "requires": {
- "d": "1",
- "es5-ext": "~0.10.14"
- }
- },
"eventemitter3": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.0.1.tgz",
@@ -1566,12 +1912,6 @@
"integrity": "sha1-BmDjUlouidnkRhKUQMJy7foktSk=",
"dev": true
},
- "exit-hook": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz",
- "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=",
- "dev": true
- },
"expand-braces": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/expand-braces/-/expand-braces-0.1.2.tgz",
@@ -1670,6 +2010,28 @@
}
}
},
+ "external-editor": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz",
+ "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==",
+ "dev": true,
+ "requires": {
+ "chardet": "^0.7.0",
+ "iconv-lite": "^0.4.24",
+ "tmp": "^0.0.33"
+ },
+ "dependencies": {
+ "iconv-lite": {
+ "version": "0.4.24",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
+ "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
+ "dev": true,
+ "requires": {
+ "safer-buffer": ">= 2.1.2 < 3"
+ }
+ }
+ }
+ },
"extglob": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz",
@@ -1704,23 +2066,21 @@
"dev": true
},
"figures": {
- "version": "1.7.0",
- "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz",
- "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=",
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",
+ "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==",
"dev": true,
"requires": {
- "escape-string-regexp": "^1.0.5",
- "object-assign": "^4.1.0"
+ "escape-string-regexp": "^1.0.5"
}
},
"file-entry-cache": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-1.3.1.tgz",
- "integrity": "sha1-RMYepgeuS+nBQC9B9EJwy/4zT/g=",
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz",
+ "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==",
"dev": true,
"requires": {
- "flat-cache": "^1.2.1",
- "object-assign": "^4.0.1"
+ "flat-cache": "^2.0.1"
}
},
"filename-regex": {
@@ -2106,17 +2466,47 @@
"dev": true
},
"flat-cache": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz",
- "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz",
+ "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==",
"dev": true,
"requires": {
- "circular-json": "^0.3.1",
- "del": "^2.0.2",
- "graceful-fs": "^4.1.2",
- "write": "^0.2.1"
+ "flatted": "^2.0.0",
+ "rimraf": "2.6.3",
+ "write": "1.0.3"
+ },
+ "dependencies": {
+ "glob": {
+ "version": "7.1.6",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
+ "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+ "dev": true,
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.0.4",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ }
+ },
+ "rimraf": {
+ "version": "2.6.3",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",
+ "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
+ "dev": true,
+ "requires": {
+ "glob": "^7.1.3"
+ }
+ }
}
},
+ "flatted": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz",
+ "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==",
+ "dev": true
+ },
"follow-redirects": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.4.1.tgz",
@@ -2759,6 +3149,18 @@
}
}
},
+ "function-bind": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
+ "dev": true
+ },
+ "functional-red-black-tree": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz",
+ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=",
+ "dev": true
+ },
"generate-function": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz",
@@ -2860,39 +3262,12 @@
}
},
"globals": {
- "version": "8.18.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-8.18.0.tgz",
- "integrity": "sha1-k9SmK9ysOM+vr8R9awNHaMsP/LQ=",
- "dev": true
- },
- "globby": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz",
- "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=",
+ "version": "12.3.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-12.3.0.tgz",
+ "integrity": "sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw==",
"dev": true,
"requires": {
- "array-union": "^1.0.1",
- "arrify": "^1.0.0",
- "glob": "^7.0.3",
- "object-assign": "^4.0.1",
- "pify": "^2.0.0",
- "pinkie-promise": "^2.0.0"
- },
- "dependencies": {
- "glob": {
- "version": "7.1.2",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
- "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
- "dev": true,
- "requires": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.0.4",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- }
- }
+ "type-fest": "^0.8.1"
}
},
"graceful-fs": {
@@ -2973,6 +3348,15 @@
"pinkie-promise": "^2.0.0"
}
},
+ "has": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
+ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+ "dev": true,
+ "requires": {
+ "function-bind": "^1.1.1"
+ }
+ },
"has-ansi": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
@@ -3011,6 +3395,12 @@
"integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=",
"dev": true
},
+ "has-symbols": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
+ "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==",
+ "dev": true
+ },
"has-value": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",
@@ -3171,6 +3561,28 @@
"integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==",
"dev": true
},
+ "ignore": {
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
+ "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==",
+ "dev": true
+ },
+ "import-fresh": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz",
+ "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==",
+ "dev": true,
+ "requires": {
+ "parent-module": "^1.0.0",
+ "resolve-from": "^4.0.0"
+ }
+ },
+ "imurmurhash": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
+ "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
+ "dev": true
+ },
"indent-string": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz",
@@ -3209,24 +3621,118 @@
"dev": true
},
"inquirer": {
- "version": "0.11.4",
- "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.11.4.tgz",
- "integrity": "sha1-geM3ToNhvq/y2XAWIG01nQsy+k0=",
- "dev": true,
- "requires": {
- "ansi-escapes": "^1.1.0",
- "ansi-regex": "^2.0.0",
- "chalk": "^1.0.0",
- "cli-cursor": "^1.0.1",
- "cli-width": "^1.0.1",
- "figures": "^1.3.5",
- "lodash": "^3.3.1",
- "readline2": "^1.0.1",
- "run-async": "^0.1.0",
- "rx-lite": "^3.1.2",
- "string-width": "^1.0.1",
- "strip-ansi": "^3.0.0",
+ "version": "7.0.4",
+ "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.4.tgz",
+ "integrity": "sha512-Bu5Td5+j11sCkqfqmUTiwv+tWisMtP0L7Q8WrqA2C/BbBhy1YTdFrvjjlrKq8oagA/tLQBski2Gcx/Sqyi2qSQ==",
+ "dev": true,
+ "requires": {
+ "ansi-escapes": "^4.2.1",
+ "chalk": "^2.4.2",
+ "cli-cursor": "^3.1.0",
+ "cli-width": "^2.0.0",
+ "external-editor": "^3.0.3",
+ "figures": "^3.0.0",
+ "lodash": "^4.17.15",
+ "mute-stream": "0.0.8",
+ "run-async": "^2.2.0",
+ "rxjs": "^6.5.3",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^5.1.0",
"through": "^2.3.6"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
+ "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
+ "dev": true
+ },
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ }
+ },
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "dev": true
+ },
+ "lodash": {
+ "version": "4.17.15",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
+ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
+ "dev": true
+ },
+ "string-width": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
+ "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
+ "dev": true,
+ "requires": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "dependencies": {
+ "strip-ansi": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
+ "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^5.0.0"
+ }
+ }
+ }
+ },
+ "strip-ansi": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^4.1.0"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+ "dev": true
+ }
+ }
+ },
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ }
}
},
"invert-kv": {
@@ -3274,6 +3780,12 @@
"builtin-modules": "^1.0.0"
}
},
+ "is-callable": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz",
+ "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==",
+ "dev": true
+ },
"is-data-descriptor": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
@@ -3283,6 +3795,12 @@
"kind-of": "^3.0.2"
}
},
+ "is-date-object": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz",
+ "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==",
+ "dev": true
+ },
"is-descriptor": {
"version": "0.1.6",
"resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
@@ -3401,30 +3919,6 @@
}
}
},
- "is-path-cwd": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz",
- "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=",
- "dev": true
- },
- "is-path-in-cwd": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz",
- "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==",
- "dev": true,
- "requires": {
- "is-path-inside": "^1.0.0"
- }
- },
- "is-path-inside": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz",
- "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=",
- "dev": true,
- "requires": {
- "path-is-inside": "^1.0.1"
- }
- },
"is-plain-object": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
@@ -3454,18 +3948,42 @@
"integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=",
"dev": true
},
+ "is-promise": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz",
+ "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=",
+ "dev": true
+ },
"is-property": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
"integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=",
"dev": true
},
- "is-resolvable": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz",
- "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==",
+ "is-regex": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz",
+ "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==",
+ "dev": true,
+ "requires": {
+ "has": "^1.0.3"
+ }
+ },
+ "is-string": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz",
+ "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==",
"dev": true
},
+ "is-symbol": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
+ "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==",
+ "dev": true,
+ "requires": {
+ "has-symbols": "^1.0.1"
+ }
+ },
"is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
@@ -3568,6 +4086,12 @@
"integrity": "sha1-+IxgjjJKM3OpW8xFrTBeXJecRZs=",
"dev": true
},
+ "js-tokens": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
+ "dev": true
+ },
"js-yaml": {
"version": "3.6.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.6.1.tgz",
@@ -3597,14 +4121,11 @@
"integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=",
"dev": true
},
- "json-stable-stringify": {
+ "json-stable-stringify-without-jsonify": {
"version": "1.0.1",
- "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz",
- "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=",
- "dev": true,
- "requires": {
- "jsonify": "~0.0.0"
- }
+ "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
+ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=",
+ "dev": true
},
"json-stringify-safe": {
"version": "5.0.1",
@@ -3627,12 +4148,6 @@
"graceful-fs": "^4.1.6"
}
},
- "jsonify": {
- "version": "0.0.0",
- "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz",
- "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=",
- "dev": true
- },
"jsonpointer": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz",
@@ -3748,309 +4263,75 @@
},
"lazystream": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz",
- "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=",
- "dev": true,
- "requires": {
- "readable-stream": "^2.0.5"
- }
- },
- "lcid": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
- "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=",
- "dev": true,
- "requires": {
- "invert-kv": "^1.0.0"
- }
- },
- "lcov-parse": {
- "version": "0.0.10",
- "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz",
- "integrity": "sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM=",
- "dev": true
- },
- "levn": {
- "version": "0.2.5",
- "resolved": "https://registry.npmjs.org/levn/-/levn-0.2.5.tgz",
- "integrity": "sha1-uo0znQykphDjo/FFucr0iAcVUFQ=",
- "dev": true,
- "requires": {
- "prelude-ls": "~1.1.0",
- "type-check": "~0.3.1"
- }
- },
- "load-json-file": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
- "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
- "dev": true,
- "requires": {
- "graceful-fs": "^4.1.2",
- "parse-json": "^2.2.0",
- "pify": "^2.0.0",
- "pinkie-promise": "^2.0.0",
- "strip-bom": "^2.0.0"
- }
- },
- "lodash": {
- "version": "3.10.1",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
- "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=",
- "dev": true
- },
- "lodash._arraycopy": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/lodash._arraycopy/-/lodash._arraycopy-3.0.0.tgz",
- "integrity": "sha1-due3wfH7klRzdIeKVi7Qaj5Q9uE=",
- "dev": true
- },
- "lodash._arrayeach": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/lodash._arrayeach/-/lodash._arrayeach-3.0.0.tgz",
- "integrity": "sha1-urFWsqkNPxu9XGU0AzSeXlkz754=",
- "dev": true
- },
- "lodash._arraymap": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/lodash._arraymap/-/lodash._arraymap-3.0.0.tgz",
- "integrity": "sha1-Go/Q9MDfS2HeoHbXF83Jfwo8PmY=",
- "dev": true
- },
- "lodash._baseassign": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz",
- "integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=",
- "dev": true,
- "requires": {
- "lodash._basecopy": "^3.0.0",
- "lodash.keys": "^3.0.0"
- }
- },
- "lodash._baseclone": {
- "version": "3.3.0",
- "resolved": "https://registry.npmjs.org/lodash._baseclone/-/lodash._baseclone-3.3.0.tgz",
- "integrity": "sha1-MDUZv2OT/n5C802LYw73eU41Qrc=",
- "dev": true,
- "requires": {
- "lodash._arraycopy": "^3.0.0",
- "lodash._arrayeach": "^3.0.0",
- "lodash._baseassign": "^3.0.0",
- "lodash._basefor": "^3.0.0",
- "lodash.isarray": "^3.0.0",
- "lodash.keys": "^3.0.0"
- }
- },
- "lodash._basecopy": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz",
- "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=",
- "dev": true
- },
- "lodash._basedifference": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/lodash._basedifference/-/lodash._basedifference-3.0.3.tgz",
- "integrity": "sha1-8sIEKWwqeOArOJCBtu3KyTPPYpw=",
- "dev": true,
- "requires": {
- "lodash._baseindexof": "^3.0.0",
- "lodash._cacheindexof": "^3.0.0",
- "lodash._createcache": "^3.0.0"
- }
- },
- "lodash._baseflatten": {
- "version": "3.1.4",
- "resolved": "https://registry.npmjs.org/lodash._baseflatten/-/lodash._baseflatten-3.1.4.tgz",
- "integrity": "sha1-B3D/gBMa9uNPO1EXlqe6UhTmX/c=",
- "dev": true,
- "requires": {
- "lodash.isarguments": "^3.0.0",
- "lodash.isarray": "^3.0.0"
- }
- },
- "lodash._basefor": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/lodash._basefor/-/lodash._basefor-3.0.3.tgz",
- "integrity": "sha1-dVC06SGO8J+tJDQ7YSAhx5tMIMI=",
- "dev": true
- },
- "lodash._baseindexof": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz",
- "integrity": "sha1-/lK1OhxnYeQmGNZU5KJXie1hgiw=",
- "dev": true
- },
- "lodash._bindcallback": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz",
- "integrity": "sha1-5THCdkTPi1epnhftlbNcdIeJOS4=",
- "dev": true
- },
- "lodash._cacheindexof": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz",
- "integrity": "sha1-PcaayCSY0u5ePOVgkbr9Ktx73pI=",
- "dev": true
- },
- "lodash._createassigner": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz",
- "integrity": "sha1-g4pbri/aymOsIt7o4Z+k5taXCxE=",
- "dev": true,
- "requires": {
- "lodash._bindcallback": "^3.0.0",
- "lodash._isiterateecall": "^3.0.0",
- "lodash.restparam": "^3.0.0"
- }
- },
- "lodash._createcache": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/lodash._createcache/-/lodash._createcache-3.1.2.tgz",
- "integrity": "sha1-VtagZAF2JeeevKa4AY4XRAvc8JM=",
- "dev": true,
- "requires": {
- "lodash._getnative": "^3.0.0"
- }
- },
- "lodash._getnative": {
- "version": "3.9.1",
- "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz",
- "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=",
- "dev": true
- },
- "lodash._isiterateecall": {
- "version": "3.0.9",
- "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz",
- "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=",
- "dev": true
- },
- "lodash._pickbyarray": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/lodash._pickbyarray/-/lodash._pickbyarray-3.0.2.tgz",
- "integrity": "sha1-H4mNlgfrVgsOFnOEt3x8bRCKpMU=",
- "dev": true
- },
- "lodash._pickbycallback": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/lodash._pickbycallback/-/lodash._pickbycallback-3.0.0.tgz",
- "integrity": "sha1-/2G5oBens699MObFPeKK+hm4dQo=",
- "dev": true,
- "requires": {
- "lodash._basefor": "^3.0.0",
- "lodash.keysin": "^3.0.0"
- }
- },
- "lodash.clonedeep": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-3.0.2.tgz",
- "integrity": "sha1-oKHkDYKl6on/WxR7hETtY9koJ9s=",
+ "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz",
+ "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=",
"dev": true,
"requires": {
- "lodash._baseclone": "^3.0.0",
- "lodash._bindcallback": "^3.0.0"
+ "readable-stream": "^2.0.5"
}
},
- "lodash.isarguments": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz",
- "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=",
- "dev": true
- },
- "lodash.isarray": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz",
- "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=",
- "dev": true
- },
- "lodash.isplainobject": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-3.2.0.tgz",
- "integrity": "sha1-moI4rhayAEMpYM1zRlEtASP79MU=",
+ "lcid": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
+ "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=",
"dev": true,
"requires": {
- "lodash._basefor": "^3.0.0",
- "lodash.isarguments": "^3.0.0",
- "lodash.keysin": "^3.0.0"
+ "invert-kv": "^1.0.0"
}
},
- "lodash.istypedarray": {
- "version": "3.0.6",
- "resolved": "https://registry.npmjs.org/lodash.istypedarray/-/lodash.istypedarray-3.0.6.tgz",
- "integrity": "sha1-yaR3SYYHUB2OhJTSg7h8OSgc72I=",
+ "lcov-parse": {
+ "version": "0.0.10",
+ "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz",
+ "integrity": "sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM=",
"dev": true
},
- "lodash.keys": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz",
- "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=",
- "dev": true,
- "requires": {
- "lodash._getnative": "^3.0.0",
- "lodash.isarguments": "^3.0.0",
- "lodash.isarray": "^3.0.0"
- }
- },
- "lodash.keysin": {
- "version": "3.0.8",
- "resolved": "https://registry.npmjs.org/lodash.keysin/-/lodash.keysin-3.0.8.tgz",
- "integrity": "sha1-IsRJPrvtsUJ5YqVLRFssinZ/tH8=",
+ "levn": {
+ "version": "0.2.5",
+ "resolved": "https://registry.npmjs.org/levn/-/levn-0.2.5.tgz",
+ "integrity": "sha1-uo0znQykphDjo/FFucr0iAcVUFQ=",
"dev": true,
"requires": {
- "lodash.isarguments": "^3.0.0",
- "lodash.isarray": "^3.0.0"
+ "prelude-ls": "~1.1.0",
+ "type-check": "~0.3.1"
}
},
- "lodash.merge": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-3.3.2.tgz",
- "integrity": "sha1-DZDZPtY3sYeEN7s+IWASYNev6ZQ=",
+ "load-json-file": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
+ "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
"dev": true,
"requires": {
- "lodash._arraycopy": "^3.0.0",
- "lodash._arrayeach": "^3.0.0",
- "lodash._createassigner": "^3.0.0",
- "lodash._getnative": "^3.0.0",
- "lodash.isarguments": "^3.0.0",
- "lodash.isarray": "^3.0.0",
- "lodash.isplainobject": "^3.0.0",
- "lodash.istypedarray": "^3.0.0",
- "lodash.keys": "^3.0.0",
- "lodash.keysin": "^3.0.0",
- "lodash.toplainobject": "^3.0.0"
+ "graceful-fs": "^4.1.2",
+ "parse-json": "^2.2.0",
+ "pify": "^2.0.0",
+ "pinkie-promise": "^2.0.0",
+ "strip-bom": "^2.0.0"
}
},
- "lodash.omit": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-3.1.0.tgz",
- "integrity": "sha1-iX/jguZBPZrJfGH3jtHgV6AK+fM=",
+ "locate-path": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
+ "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
"dev": true,
"requires": {
- "lodash._arraymap": "^3.0.0",
- "lodash._basedifference": "^3.0.0",
- "lodash._baseflatten": "^3.0.0",
- "lodash._bindcallback": "^3.0.0",
- "lodash._pickbyarray": "^3.0.0",
- "lodash._pickbycallback": "^3.0.0",
- "lodash.keysin": "^3.0.0",
- "lodash.restparam": "^3.0.0"
+ "p-locate": "^2.0.0",
+ "path-exists": "^3.0.0"
+ },
+ "dependencies": {
+ "path-exists": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
+ "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
+ "dev": true
+ }
}
},
- "lodash.restparam": {
- "version": "3.6.1",
- "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz",
- "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=",
+ "lodash": {
+ "version": "3.10.1",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
+ "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=",
"dev": true
},
- "lodash.toplainobject": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/lodash.toplainobject/-/lodash.toplainobject-3.0.0.tgz",
- "integrity": "sha1-KHkK2ULSk9eKpmOgfs9/UsoEGY0=",
- "dev": true,
- "requires": {
- "lodash._basecopy": "^3.0.0",
- "lodash.keysin": "^3.0.0"
- }
- },
"log-driver": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.5.tgz",
@@ -4234,6 +4515,12 @@
"mime-db": "~1.33.0"
}
},
+ "mimic-fn": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
+ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
+ "dev": true
+ },
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
@@ -4294,9 +4581,9 @@
"dev": true
},
"mute-stream": {
- "version": "0.0.5",
- "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz",
- "integrity": "sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA=",
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
+ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
"dev": true
},
"nan": {
@@ -4346,16 +4633,22 @@
}
}
},
+ "natural-compare": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
+ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=",
+ "dev": true
+ },
"negotiator": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz",
"integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=",
"dev": true
},
- "next-tick": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz",
- "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=",
+ "nice-try": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
+ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
"dev": true
},
"nopt": {
@@ -4507,6 +4800,18 @@
}
}
},
+ "object-inspect": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz",
+ "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==",
+ "dev": true
+ },
+ "object-keys": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
+ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
+ "dev": true
+ },
"object-visit": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz",
@@ -4524,6 +4829,18 @@
}
}
},
+ "object.assign": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz",
+ "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.2",
+ "function-bind": "^1.1.1",
+ "has-symbols": "^1.0.0",
+ "object-keys": "^1.0.11"
+ }
+ },
"object.omit": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz",
@@ -4551,6 +4868,18 @@
}
}
},
+ "object.values": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz",
+ "integrity": "sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.0-next.1",
+ "function-bind": "^1.1.1",
+ "has": "^1.0.3"
+ }
+ },
"on-finished": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
@@ -4570,10 +4899,13 @@
}
},
"onetime": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz",
- "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=",
- "dev": true
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz",
+ "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==",
+ "dev": true,
+ "requires": {
+ "mimic-fn": "^2.1.0"
+ }
},
"optimist": {
"version": "0.6.1",
@@ -4594,17 +4926,35 @@
}
},
"optionator": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.6.0.tgz",
- "integrity": "sha1-tj7Lvw4xX61LyYJ7Rdx7pFKE/LY=",
+ "version": "0.8.3",
+ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
+ "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
"dev": true,
"requires": {
"deep-is": "~0.1.3",
- "fast-levenshtein": "~1.0.6",
- "levn": "~0.2.5",
- "prelude-ls": "~1.1.1",
- "type-check": "~0.3.1",
- "wordwrap": "~0.0.2"
+ "fast-levenshtein": "~2.0.6",
+ "levn": "~0.3.0",
+ "prelude-ls": "~1.1.2",
+ "type-check": "~0.3.2",
+ "word-wrap": "~1.2.3"
+ },
+ "dependencies": {
+ "fast-levenshtein": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
+ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=",
+ "dev": true
+ },
+ "levn": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
+ "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
+ "dev": true,
+ "requires": {
+ "prelude-ls": "~1.1.2",
+ "type-check": "~0.3.2"
+ }
+ }
}
},
"options": {
@@ -4634,6 +4984,39 @@
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
"dev": true
},
+ "p-limit": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
+ "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
+ "dev": true,
+ "requires": {
+ "p-try": "^1.0.0"
+ }
+ },
+ "p-locate": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
+ "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
+ "dev": true,
+ "requires": {
+ "p-limit": "^1.1.0"
+ }
+ },
+ "p-try": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
+ "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
+ "dev": true
+ },
+ "parent-module": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
+ "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
+ "dev": true,
+ "requires": {
+ "callsites": "^3.0.0"
+ }
+ },
"parse-glob": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz",
@@ -4715,10 +5098,10 @@
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
"dev": true
},
- "path-is-inside": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz",
- "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=",
+ "path-key": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
+ "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
"dev": true
},
"path-parse": {
@@ -4765,6 +5148,26 @@
"pinkie": "^2.0.0"
}
},
+ "pkg-dir": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz",
+ "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=",
+ "dev": true,
+ "requires": {
+ "find-up": "^2.1.0"
+ },
+ "dependencies": {
+ "find-up": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
+ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
+ "dev": true,
+ "requires": {
+ "locate-path": "^2.0.0"
+ }
+ }
+ }
+ },
"posix-character-classes": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
@@ -5010,17 +5413,6 @@
"set-immediate-shim": "^1.0.1"
}
},
- "readline2": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz",
- "integrity": "sha1-QQWWCP/BVHV7cV2ZidGZ/783LjU=",
- "dev": true,
- "requires": {
- "code-point-at": "^1.0.0",
- "is-fullwidth-code-point": "^1.0.0",
- "mute-stream": "0.0.5"
- }
- },
"redent": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz",
@@ -5050,6 +5442,12 @@
"safe-regex": "^1.1.0"
}
},
+ "regexpp": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz",
+ "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==",
+ "dev": true
+ },
"remove-trailing-separator": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
@@ -5127,6 +5525,12 @@
"global-modules": "^1.0.0"
}
},
+ "resolve-from": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
+ "dev": true
+ },
"resolve-url": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
@@ -5134,13 +5538,13 @@
"dev": true
},
"restore-cursor": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz",
- "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",
+ "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",
"dev": true,
"requires": {
- "exit-hook": "^1.0.0",
- "onetime": "^1.0.0"
+ "onetime": "^5.1.0",
+ "signal-exit": "^3.0.2"
}
},
"ret": {
@@ -5195,19 +5599,22 @@
}
},
"run-async": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz",
- "integrity": "sha1-yK1KXhEGYeQCp9IbUw4AnyX444k=",
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz",
+ "integrity": "sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg==",
"dev": true,
"requires": {
- "once": "^1.3.0"
+ "is-promise": "^2.1.0"
}
},
- "rx-lite": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz",
- "integrity": "sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI=",
- "dev": true
+ "rxjs": {
+ "version": "6.5.4",
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.4.tgz",
+ "integrity": "sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==",
+ "dev": true,
+ "requires": {
+ "tslib": "^1.9.0"
+ }
},
"safe-buffer": {
"version": "5.1.1",
@@ -5224,6 +5631,12 @@
"ret": "~0.1.10"
}
},
+ "safer-buffer": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
+ "dev": true
+ },
"sauce-connect-launcher": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/sauce-connect-launcher/-/sauce-connect-launcher-1.2.4.tgz",
@@ -5304,10 +5717,19 @@
"integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==",
"dev": true
},
- "shelljs": {
- "version": "0.5.3",
- "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz",
- "integrity": "sha1-xUmCuZbHbvDB5rWfvcWCX1txMRM=",
+ "shebang-command": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
+ "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
+ "dev": true,
+ "requires": {
+ "shebang-regex": "^1.0.0"
+ }
+ },
+ "shebang-regex": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
+ "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
"dev": true
},
"signal-exit": {
@@ -5316,6 +5738,34 @@
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
"dev": true
},
+ "slice-ansi": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz",
+ "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.0",
+ "astral-regex": "^1.0.0",
+ "is-fullwidth-code-point": "^2.0.0"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "is-fullwidth-code-point": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "dev": true
+ }
+ }
+ },
"snapdragon": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
@@ -5732,6 +6182,26 @@
"strip-ansi": "^3.0.0"
}
},
+ "string.prototype.trimleft": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz",
+ "integrity": "sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.3",
+ "function-bind": "^1.1.1"
+ }
+ },
+ "string.prototype.trimright": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz",
+ "integrity": "sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.3",
+ "function-bind": "^1.1.1"
+ }
+ },
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
@@ -5775,9 +6245,9 @@
}
},
"strip-json-comments": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz",
- "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=",
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz",
+ "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==",
"dev": true
},
"supports-color": {
@@ -5786,6 +6256,88 @@
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
"dev": true
},
+ "table": {
+ "version": "5.4.6",
+ "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz",
+ "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==",
+ "dev": true,
+ "requires": {
+ "ajv": "^6.10.2",
+ "lodash": "^4.17.14",
+ "slice-ansi": "^2.1.0",
+ "string-width": "^3.0.0"
+ },
+ "dependencies": {
+ "ajv": {
+ "version": "6.12.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz",
+ "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ }
+ },
+ "ansi-regex": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+ "dev": true
+ },
+ "emoji-regex": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
+ "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
+ "dev": true
+ },
+ "fast-deep-equal": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz",
+ "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "dev": true
+ },
+ "json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true
+ },
+ "lodash": {
+ "version": "4.17.15",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
+ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
+ "dev": true
+ },
+ "string-width": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+ "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+ "dev": true,
+ "requires": {
+ "emoji-regex": "^7.0.1",
+ "is-fullwidth-code-point": "^2.0.0",
+ "strip-ansi": "^5.1.0"
+ }
+ },
+ "strip-ansi": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^4.1.0"
+ }
+ }
+ }
+ },
"tar-stream": {
"version": "1.6.1",
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.1.tgz",
@@ -5891,6 +6443,12 @@
"integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=",
"dev": true
},
+ "tslib": {
+ "version": "1.11.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.0.tgz",
+ "integrity": "sha512-BmndXUtiTn/VDDrJzQE7Mm22Ix3PxgLltW9bSNLoeCY31gnG2OPx0QqJnuc9oMIKioYrz487i6K9o4Pdn0j+Kg==",
+ "dev": true
+ },
"tunnel-agent": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz",
@@ -5913,6 +6471,12 @@
"prelude-ls": "~1.1.2"
}
},
+ "type-fest": {
+ "version": "0.8.1",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",
+ "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==",
+ "dev": true
+ },
"type-is": {
"version": "1.6.16",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz",
@@ -5923,12 +6487,6 @@
"mime-types": "~2.1.18"
}
},
- "typedarray": {
- "version": "0.0.6",
- "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
- "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
- "dev": true
- },
"uglify-js": {
"version": "3.3.21",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.21.tgz",
@@ -6069,6 +6627,23 @@
}
}
},
+ "uri-js": {
+ "version": "4.2.2",
+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
+ "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
+ "dev": true,
+ "requires": {
+ "punycode": "^2.1.0"
+ },
+ "dependencies": {
+ "punycode": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
+ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
+ "dev": true
+ }
+ }
+ },
"urix": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",
@@ -6092,15 +6667,6 @@
}
}
},
- "user-home": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz",
- "integrity": "sha1-nHC/2Babwdy/SGBODwS4tJzenp8=",
- "dev": true,
- "requires": {
- "os-homedir": "^1.0.0"
- }
- },
"useragent": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/useragent/-/useragent-2.3.0.tgz",
@@ -6129,6 +6695,12 @@
"integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==",
"dev": true
},
+ "v8-compile-cache": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz",
+ "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==",
+ "dev": true
+ },
"validate-npm-package-license": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz",
@@ -6386,6 +6958,12 @@
"dev": true,
"optional": true
},
+ "word-wrap": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
+ "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
+ "dev": true
+ },
"wordwrap": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
@@ -6409,9 +6987,9 @@
"dev": true
},
"write": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz",
- "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz",
+ "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==",
"dev": true,
"requires": {
"mkdirp": "^0.5.1"
@@ -6433,12 +7011,6 @@
"integrity": "sha1-OS2LotDxw00e4tYw8V0O+2jhBIo=",
"dev": true
},
- "xml-escape": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/xml-escape/-/xml-escape-1.0.0.tgz",
- "integrity": "sha1-AJY9aXsq3wwYXE4E5zF0upsojrI=",
- "dev": true
- },
"xmlhttprequest-ssl": {
"version": "1.5.3",
"resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.3.tgz",
diff --git a/package.json b/package.json
index 2b34d75e5..1a3a5a6ee 100644
--- a/package.json
+++ b/package.json
@@ -20,7 +20,8 @@
"devDependencies": {
"coveralls": "^2.11.2",
"docco": "*",
- "eslint": "1.10.x",
+ "eslint": "^6.8.0",
+ "eslint-plugin-import": "^2.20.1",
"gzip-size-cli": "^1.0.0",
"karma": "^0.13.13",
"karma-qunit": "~2.0.1",
diff --git a/test/.eslintrc b/test/.eslintrc
index fe75e810a..e8b6900da 100644
--- a/test/.eslintrc
+++ b/test/.eslintrc
@@ -2,6 +2,7 @@
"env": {
"browser": true
},
+ "parserOptions": {},
"globals": {
"QUnit": false
},
From 28700cfbfb1fc374bdea00010d6b0e748e546201 Mon Sep 17 00:00:00 2001
From: Julian Gonggrijp
Date: Sat, 7 Mar 2020 16:10:24 +0100
Subject: [PATCH 026/253] Wrap the isArguments(arguments) check in an IIFE
---
underscore-source.js | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/underscore-source.js b/underscore-source.js
index 9a0aaa5ce..1e5a0c03c 100644
--- a/underscore-source.js
+++ b/underscore-source.js
@@ -1340,11 +1340,13 @@
// Define a fallback version of the method in browsers (ahem, IE < 9), where
// there isn't any inspectable "Arguments" type.
- if (!isArguments(arguments)) {
- isArguments = function(obj) {
- return has(obj, 'callee');
- };
- }
+ (function() {
+ if (!isArguments(arguments)) {
+ isArguments = function(obj) {
+ return has(obj, 'callee');
+ };
+ }
+ }());
// Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8,
// IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).
From d2cf33d215cc1c1cb4b31c6f3f14977811629840 Mon Sep 17 00:00:00 2001
From: Julian Gonggrijp
Date: Mon, 9 Mar 2020 14:30:00 +0100
Subject: [PATCH 027/253] Rename typeTester to tagTester
---
underscore-source.js | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/underscore-source.js b/underscore-source.js
index 1e5a0c03c..c64d1499a 100644
--- a/underscore-source.js
+++ b/underscore-source.js
@@ -1308,7 +1308,7 @@
}
// Internal function for creating a toString-based type tester.
- function typeTester(name) {
+ function tagTester(name) {
return function(obj) {
return toString.call(obj) === '[object ' + name + ']';
};
@@ -1316,7 +1316,7 @@
// Is a given value an array?
// Delegates to ECMA5's native Array.isArray
- export var isArray = nativeIsArray || typeTester('Array');
+ export var isArray = nativeIsArray || tagTester('Array');
// Is a given variable an object?
export function isObject(obj) {
@@ -1325,18 +1325,18 @@
}
// Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError, isMap, isWeakMap, isSet, isWeakSet.
- export var isArguments = typeTester('Arguments');
- export var isFunction = typeTester('Function');
- export var isString = typeTester('String');
- export var isNumber = typeTester('Number');
- export var isDate = typeTester('Date');
- export var isRegExp = typeTester('RegExp');
- export var isError = typeTester('Error');
- export var isSymbol = typeTester('Symbol');
- export var isMap = typeTester('Map');
- export var isWeakMap = typeTester('WeakMap');
- export var isSet = typeTester('Set');
- export var isWeakSet = typeTester('WeakSet');
+ export var isArguments = tagTester('Arguments');
+ export var isFunction = tagTester('Function');
+ export var isString = tagTester('String');
+ export var isNumber = tagTester('Number');
+ export var isDate = tagTester('Date');
+ export var isRegExp = tagTester('RegExp');
+ export var isError = tagTester('Error');
+ export var isSymbol = tagTester('Symbol');
+ export var isMap = tagTester('Map');
+ export var isWeakMap = tagTester('WeakMap');
+ export var isSet = tagTester('Set');
+ export var isWeakSet = tagTester('WeakSet');
// Define a fallback version of the method in browsers (ahem, IE < 9), where
// there isn't any inspectable "Arguments" type.
From 6ae7bac4c9420f56f2fe9565ed4c41092ed18578 Mon Sep 17 00:00:00 2001
From: Julian Gonggrijp
Date: Thu, 12 Mar 2020 20:19:46 +0100
Subject: [PATCH 028/253] Consistently use _name only for internal names
(#2826)
---
underscore-source.js | 193 +++++++++++++++++++++----------------------
1 file changed, 96 insertions(+), 97 deletions(-)
diff --git a/underscore-source.js b/underscore-source.js
index c64d1499a..49a0a2a11 100644
--- a/underscore-source.js
+++ b/underscore-source.js
@@ -34,6 +34,10 @@
nativeKeys = Object.keys,
nativeCreate = Object.create;
+ // Create references to these builtin functions because we override them.
+ var _isNaN = root.isNaN,
+ _isFinite = root.isFinite;
+
// Naked function reference for surrogate-prototype-swapping.
var Ctor = function(){};
@@ -139,7 +143,7 @@
};
}
- function has(obj, path) {
+ function _has(obj, path) {
return obj != null && hasOwnProperty.call(obj, path);
}
@@ -178,9 +182,9 @@
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;
@@ -190,11 +194,11 @@
export { map as collect };
export function map(obj, iteratee, context) {
iteratee = cb(iteratee, context);
- var keys = !isArrayLike(obj) && _keys(obj),
- length = (keys || obj).length,
+ 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;
+ var currentKey = _keys ? _keys[index] : index;
results[index] = iteratee(obj[currentKey], currentKey, obj);
}
return results;
@@ -205,15 +209,15 @@
// Wrap code that reassigns argument variables in a separate function than
// the one that accesses `arguments.length` to avoid a perf hit. (#1991)
var reducer = function(obj, iteratee, memo, initial) {
- var keys = !isArrayLike(obj) && _keys(obj),
- length = (keys || obj).length,
+ var _keys = !isArrayLike(obj) && keys(obj),
+ length = (_keys || obj).length,
index = dir > 0 ? 0 : length - 1;
if (!initial) {
- memo = obj[keys ? keys[index] : index];
+ memo = obj[_keys ? _keys[index] : index];
index += dir;
}
for (; index >= 0 && index < length; index += dir) {
- var currentKey = keys ? keys[index] : index;
+ var currentKey = _keys ? _keys[index] : index;
memo = iteratee(memo, obj[currentKey], currentKey, obj);
}
return memo;
@@ -262,10 +266,10 @@
export { every as all };
export function every(obj, predicate, context) {
predicate = cb(predicate, context);
- var keys = !isArrayLike(obj) && _keys(obj),
- length = (keys || obj).length;
+ var _keys = !isArrayLike(obj) && keys(obj),
+ length = (_keys || obj).length;
for (var index = 0; index < length; index++) {
- var currentKey = keys ? keys[index] : index;
+ var currentKey = _keys ? _keys[index] : index;
if (!predicate(obj[currentKey], currentKey, obj)) return false;
}
return true;
@@ -275,10 +279,10 @@
export { some as any };
export function some(obj, predicate, context) {
predicate = cb(predicate, context);
- var keys = !isArrayLike(obj) && _keys(obj),
- length = (keys || obj).length;
+ var _keys = !isArrayLike(obj) && keys(obj),
+ length = (_keys || obj).length;
for (var index = 0; index < length; index++) {
- var currentKey = keys ? keys[index] : index;
+ var currentKey = _keys ? _keys[index] : index;
if (predicate(obj[currentKey], currentKey, obj)) return true;
}
return false;
@@ -445,7 +449,7 @@
// Groups the object's values by a criterion. Pass either a string attribute
// to group by, or a function that returns the criterion.
export var groupBy = group(function(result, value, key) {
- if (has(result, key)) result[key].push(value); else result[key] = [value];
+ if (_has(result, key)) result[key].push(value); else result[key] = [value];
});
// Indexes the object's values by a criterion, similar to `groupBy`, but for
@@ -458,7 +462,7 @@
// either a string attribute to count by, or a function that returns the
// criterion.
export var countBy = group(function(result, value, key) {
- if (has(result, key)) result[key]++; else result[key] = 1;
+ if (_has(result, key)) result[key]++; else result[key] = 1;
});
var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;
@@ -477,7 +481,7 @@
// Return the number of elements in an object.
export function size(obj) {
if (obj == null) return 0;
- return isArrayLike(obj) ? obj.length : _keys(obj).length;
+ return isArrayLike(obj) ? obj.length : keys(obj).length;
}
// Split a collection into two arrays: one whose elements all satisfy the given
@@ -527,7 +531,7 @@
}
// Internal implementation of a recursive `flatten` function.
- function flatten(input, shallow, strict, output) {
+ function _flatten(input, shallow, strict, output) {
output = output || [];
var idx = output.length;
for (var i = 0, length = getLength(input); i < length; i++) {
@@ -538,7 +542,7 @@
var j = 0, len = value.length;
while (j < len) output[idx++] = value[j++];
} else {
- flatten(value, shallow, strict, output);
+ _flatten(value, shallow, strict, output);
idx = output.length;
}
} else if (!strict) {
@@ -549,9 +553,8 @@
}
// Flatten out an array, either recursively (by default), or just one level.
- export { _flatten as flatten };
- function _flatten(array, shallow) {
- return flatten(array, shallow, false);
+ export function flatten(array, shallow) {
+ return _flatten(array, shallow, false);
}
// Return a version of the array that does not contain the specified value(s).
@@ -595,7 +598,7 @@
// Produce an array that contains the union: each distinct element from all of
// the passed-in arrays.
export var union = restArguments(function(arrays) {
- return uniq(flatten(arrays, true, true));
+ return uniq(_flatten(arrays, true, true));
});
// Produce an array that contains every item shared between all the
@@ -618,7 +621,7 @@
// Take the difference between one array and a number of other arrays.
// Only the elements present in just the first array will remain.
export var difference = restArguments(function(array, rest) {
- rest = flatten(rest, true, true);
+ rest = _flatten(rest, true, true);
return filter(array, function(value){
return !contains(rest, value);
});
@@ -700,7 +703,7 @@
return array[idx] === item ? idx : -1;
}
if (item !== item) {
- idx = predicateFind(slice.call(array, i, length), _isNaN);
+ 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) {
@@ -798,12 +801,12 @@
// Bind a number of an object's methods to that object. Remaining arguments
// are the method names to be bound. Useful for ensuring that all callbacks
// defined on an object belong to it.
- export var bindAll = restArguments(function(obj, keys) {
- keys = flatten(keys, false, false);
- var index = keys.length;
+ export var bindAll = 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];
+ var key = _keys[index];
obj[key] = bind(obj[key], obj);
}
});
@@ -813,7 +816,7 @@
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);
+ if (!_has(cache, address)) cache[address] = func.apply(this, arguments);
return cache[address];
};
memoize.cache = {};
@@ -971,53 +974,52 @@
var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',
'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
- function collectNonEnumProps(obj, keys) {
+ function collectNonEnumProps(obj, _keys) {
var nonEnumIdx = nonEnumerableProps.length;
var constructor = obj.constructor;
var proto = isFunction(constructor) && constructor.prototype || ObjProto;
// Constructor is a special case.
var prop = 'constructor';
- if (has(obj, prop) && !contains(keys, prop)) keys.push(prop);
+ if (_has(obj, prop) && !contains(_keys, prop)) _keys.push(prop);
while (nonEnumIdx--) {
prop = nonEnumerableProps[nonEnumIdx];
- if (prop in obj && obj[prop] !== proto[prop] && !contains(keys, prop)) {
- keys.push(prop);
+ if (prop in obj && obj[prop] !== proto[prop] && !contains(_keys, prop)) {
+ _keys.push(prop);
}
}
}
// Retrieve the names of an object's own properties.
// Delegates to **ECMAScript 5**'s native `Object.keys`.
- export { _keys as keys };
- function _keys(obj) {
+ export 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);
+ var _keys = [];
+ for (var key in obj) if (_has(obj, key)) _keys.push(key);
// Ahem, IE < 9.
- if (hasEnumBug) collectNonEnumProps(obj, keys);
- return keys;
+ if (hasEnumBug) collectNonEnumProps(obj, _keys);
+ return _keys;
}
// Retrieve all the property names of an object.
export function allKeys(obj) {
if (!isObject(obj)) return [];
- var keys = [];
- for (var key in obj) keys.push(key);
+ var _keys = [];
+ for (var key in obj) _keys.push(key);
// Ahem, IE < 9.
- if (hasEnumBug) collectNonEnumProps(obj, keys);
- return keys;
+ if (hasEnumBug) collectNonEnumProps(obj, _keys);
+ return _keys;
}
// Retrieve the values of an object's properties.
export function values(obj) {
- var keys = _keys(obj);
- var length = keys.length;
+ var _keys = keys(obj);
+ var length = _keys.length;
var values = Array(length);
for (var i = 0; i < length; i++) {
- values[i] = obj[keys[i]];
+ values[i] = obj[_keys[i]];
}
return values;
}
@@ -1026,11 +1028,11 @@
// In contrast to map it returns an object.
export function mapObject(obj, iteratee, context) {
iteratee = cb(iteratee, context);
- var keys = _keys(obj),
- length = keys.length,
+ var _keys = keys(obj),
+ length = _keys.length,
results = {};
for (var index = 0; index < length; index++) {
- var currentKey = keys[index];
+ var currentKey = _keys[index];
results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
}
return results;
@@ -1039,11 +1041,11 @@
// Convert an object into a list of `[key, value]` pairs.
// The opposite of object.
export function pairs(obj) {
- var keys = _keys(obj);
- var length = keys.length;
+ 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]]];
+ pairs[i] = [_keys[i], obj[_keys[i]]];
}
return pairs;
}
@@ -1051,9 +1053,9 @@
// Invert the keys and values of an object. The values must be serializable.
export function invert(obj) {
var result = {};
- var keys = _keys(obj);
- for (var i = 0, length = keys.length; i < length; i++) {
- result[obj[keys[i]]] = keys[i];
+ var _keys = keys(obj);
+ for (var i = 0, length = _keys.length; i < length; i++) {
+ result[obj[_keys[i]]] = _keys[i];
}
return result;
}
@@ -1076,10 +1078,10 @@
if (length < 2 || obj == null) return obj;
for (var index = 1; index < length; index++) {
var source = arguments[index],
- keys = keysFunc(source),
- l = keys.length;
+ _keys = keysFunc(source),
+ l = _keys.length;
for (var i = 0; i < l; i++) {
- var key = keys[i];
+ var key = _keys[i];
if (!defaults || obj[key] === void 0) obj[key] = source[key];
}
}
@@ -1092,15 +1094,15 @@
// Assigns a given object with all the own properties in the passed-in object(s).
// (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
- export var extendOwn = createAssigner(_keys);
+ export var extendOwn = createAssigner(keys);
export { extendOwn as assign };
// Returns the first key on an object that passes a predicate test.
export 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];
+ 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;
}
}
@@ -1111,19 +1113,19 @@
}
// Return a copy of the object only containing the whitelisted properties.
- export var pick = restArguments(function(obj, keys) {
- var result = {}, iteratee = keys[0];
+ export var pick = 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 (_keys.length > 1) iteratee = optimizeCb(iteratee, _keys[1]);
+ _keys = allKeys(obj);
} else {
iteratee = keyInObj;
- keys = flatten(keys, false, false);
+ _keys = _flatten(_keys, false, false);
obj = Object(obj);
}
- for (var i = 0, length = keys.length; i < length; i++) {
- var key = keys[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;
}
@@ -1131,15 +1133,15 @@
});
// Return a copy of the object without the blacklisted properties.
- export var omit = restArguments(function(obj, keys) {
- var iteratee = keys[0], context;
+ export var omit = restArguments(function(obj, _keys) {
+ var iteratee = _keys[0], context;
if (isFunction(iteratee)) {
iteratee = negate(iteratee);
- if (keys.length > 1) context = keys[1];
+ if (_keys.length > 1) context = _keys[1];
} else {
- keys = map(flatten(keys, false, false), String);
+ _keys = map(_flatten(_keys, false, false), String);
iteratee = function(value, key) {
- return !contains(keys, key);
+ return !contains(_keys, key);
};
}
return pick(obj, iteratee, context);
@@ -1173,11 +1175,11 @@
// Returns whether an object has a given set of `key:value` pairs.
export function isMatch(object, attrs) {
- var keys = _keys(attrs), length = keys.length;
+ var _keys = keys(attrs), length = _keys.length;
if (object == null) return !length;
var obj = Object(object);
for (var i = 0; i < length; i++) {
- var key = keys[i];
+ var key = _keys[i];
if (attrs[key] !== obj[key] || !(key in obj)) return false;
}
return true;
@@ -1273,14 +1275,14 @@
}
} else {
// Deep compare objects.
- var keys = _keys(a), key;
- length = keys.length;
+ var _keys = keys(a), key;
+ length = _keys.length;
// Ensure that both objects contain the same number of properties before comparing deep equality.
- if (_keys(b).length !== length) return false;
+ if (keys(b).length !== length) return false;
while (length--) {
// Deep compare each member
- key = keys[length];
- if (!(has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
+ key = _keys[length];
+ if (!(_has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
}
}
// Remove the first object from the stack of traversed objects.
@@ -1299,7 +1301,7 @@
export function isEmpty(obj) {
if (obj == null) return true;
if (isArrayLike(obj) && (isArray(obj) || isString(obj) || isArguments(obj))) return obj.length === 0;
- return _keys(obj).length === 0;
+ return keys(obj).length === 0;
}
// Is a given value a DOM element?
@@ -1343,7 +1345,7 @@
(function() {
if (!isArguments(arguments)) {
isArguments = function(obj) {
- return has(obj, 'callee');
+ return _has(obj, 'callee');
};
}
}());
@@ -1358,15 +1360,13 @@
}
// Is a given object a finite number?
- export { _isFinite as isFinite };
- function _isFinite(obj) {
- return !isSymbol(obj) && isFinite(obj) && !isNaN(parseFloat(obj));
+ export function isFinite(obj) {
+ return !isSymbol(obj) && _isFinite(obj) && !_isNaN(parseFloat(obj));
}
// Is the given value `NaN`?
- export { _isNaN as isNaN };
- function _isNaN(obj) {
- return isNumber(obj) && isNaN(obj);
+ export function isNaN(obj) {
+ return isNumber(obj) && _isNaN(obj);
}
// Is a given value a boolean?
@@ -1386,10 +1386,9 @@
// Shortcut function for checking if an object has a given property directly
// on itself (in other words, not on a prototype).
- export { _has as has };
- function _has(obj, path) {
+ export function has(obj, path) {
if (!isArray(path)) {
- return has(obj, path);
+ return _has(obj, path);
}
var length = path.length;
for (var i = 0; i < length; i++) {
@@ -1489,7 +1488,7 @@
return map[match];
};
// Regexes for identifying a key that needs to be escaped.
- var source = '(?:' + _keys(map).join('|') + ')';
+ var source = '(?:' + keys(map).join('|') + ')';
var testRegexp = RegExp(source);
var replaceRegexp = RegExp(source, 'g');
return function(string) {
From 1202da0a914a20a73b8b91087d226cb77369cf3e Mon Sep 17 00:00:00 2001
From: Julian Gonggrijp
Date: Fri, 13 Mar 2020 14:33:15 +0100
Subject: [PATCH 029/253] Drop the obsolete indentation
---
underscore-source.js | 3118 +++++++++++++++++++++---------------------
1 file changed, 1557 insertions(+), 1561 deletions(-)
diff --git a/underscore-source.js b/underscore-source.js
index 49a0a2a11..98d69a4fa 100644
--- a/underscore-source.js
+++ b/underscore-source.js
@@ -3,1680 +3,1676 @@
// (c) 2009-2018 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
// Underscore may be freely distributed under the MIT license.
-// There used to be an IIFE around all of the code below. The wrapper
-// is gone, but I'm keeping the indent for now to keep the diff as
-// small as possible.
-
- // Baseline setup
- // --------------
-
- // Establish the root object, `window` (`self`) in the browser, `global`
- // on the server, or `this` in some virtual machines. We use `self`
- // instead of `window` for `WebWorker` support.
- var root = typeof self == 'object' && self.self === self && self ||
- typeof global == 'object' && global.global === global && global ||
- this ||
- {};
-
- // Save bytes in the minified (but not gzipped) version:
- var ArrayProto = Array.prototype, ObjProto = Object.prototype;
- var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;
-
- // Create quick reference variables for speed access to core prototypes.
- var push = ArrayProto.push,
- slice = ArrayProto.slice,
- toString = ObjProto.toString,
- hasOwnProperty = ObjProto.hasOwnProperty;
-
- // All **ECMAScript 5** native function implementations that we hope to use
- // are declared here.
- var nativeIsArray = Array.isArray,
- nativeKeys = Object.keys,
- nativeCreate = Object.create;
-
- // Create references to these builtin functions because we override them.
- var _isNaN = root.isNaN,
- _isFinite = root.isFinite;
-
- // Naked function reference for surrogate-prototype-swapping.
- var Ctor = function(){};
-
- // The Underscore object. All exported functions below are added to it in the
- // underscore-module.js using the mixin function.
- export default function _(obj) {
- if (obj instanceof _) return obj;
- if (!(this instanceof _)) return new _(obj);
- this._wrapped = obj;
- }
-
- // Current version.
- export var VERSION = _.VERSION = '1.9.2';
-
- // Internal function that returns an efficient (for current engines) version
- // of the passed-in callback, to be repeatedly applied in other Underscore
- // functions.
- 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);
- };
- // The 2-argument case is omitted because we’re not using it.
- 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);
- };
- }
- return function() {
- return func.apply(context, arguments);
+// Baseline setup
+// --------------
+
+// Establish the root object, `window` (`self`) in the browser, `global`
+// on the server, or `this` in some virtual machines. We use `self`
+// instead of `window` for `WebWorker` support.
+var root = typeof self == 'object' && self.self === self && self ||
+ typeof global == 'object' && global.global === global && global ||
+ this ||
+ {};
+
+// Save bytes in the minified (but not gzipped) version:
+var ArrayProto = Array.prototype, ObjProto = Object.prototype;
+var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;
+
+// Create quick reference variables for speed access to core prototypes.
+var push = ArrayProto.push,
+ slice = ArrayProto.slice,
+ toString = ObjProto.toString,
+ hasOwnProperty = ObjProto.hasOwnProperty;
+
+// All **ECMAScript 5** native function implementations that we hope to use
+// are declared here.
+var nativeIsArray = Array.isArray,
+ nativeKeys = Object.keys,
+ nativeCreate = Object.create;
+
+// Create references to these builtin functions because we override them.
+var _isNaN = root.isNaN,
+ _isFinite = root.isFinite;
+
+// Naked function reference for surrogate-prototype-swapping.
+var Ctor = function(){};
+
+// The Underscore object. All exported functions below are added to it in the
+// underscore-module.js using the mixin function.
+export default function _(obj) {
+ if (obj instanceof _) return obj;
+ if (!(this instanceof _)) return new _(obj);
+ this._wrapped = obj;
+}
+
+// Current version.
+export var VERSION = _.VERSION = '1.9.2';
+
+// Internal function that returns an efficient (for current engines) version
+// of the passed-in callback, to be repeatedly applied in other Underscore
+// functions.
+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);
};
- }
-
- // An internal function to generate callbacks that can be applied to each
- // element in a collection, returning the desired result — either `identity`,
- // an arbitrary callback, a property matcher, or a property accessor.
- 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);
- }
-
- // External wrapper for our callback generator. Users may customize
- // `_.iteratee` if they want additional predicate/iteratee shorthand styles.
- // This abstraction hides the internal-only argCount argument.
- _.iteratee = iteratee;
- export function iteratee(value, context) {
- return baseIteratee(value, context, Infinity);
- }
-
- // The function we actually call internally. It invokes _.iteratee if
- // overridden, otherwise baseIteratee.
- function cb(value, context, argCount) {
- if (_.iteratee !== iteratee) return _.iteratee(value, context);
- return baseIteratee(value, context, argCount);
- }
-
- // Some functions take a variable number of arguments, or a few expected
- // arguments at the beginning and then a variable number of values to operate
- // on. This helper accumulates all remaining arguments past the function’s
- // argument length (or an explicit `startIndex`), into an array that becomes
- // the last argument. Similar to ES6’s "rest parameter".
- export 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];
- }
- 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);
- }
- var args = Array(startIndex + 1);
- for (index = 0; index < startIndex; index++) {
- args[index] = arguments[index];
- }
- args[startIndex] = rest;
- return func.apply(this, args);
+ // The 2-argument case is omitted because we’re not using it.
+ case 3: return function(value, index, collection) {
+ return func.call(context, value, index, collection);
};
- }
-
- // An internal function for creating a new object that inherits from another.
- function baseCreate(prototype) {
- if (!isObject(prototype)) return {};
- if (nativeCreate) return nativeCreate(prototype);
- Ctor.prototype = prototype;
- var result = new Ctor;
- Ctor.prototype = null;
- return result;
- }
-
- function shallowProperty(key) {
- return function(obj) {
- return obj == null ? void 0 : obj[key];
+ case 4: return function(accumulator, value, index, collection) {
+ return func.call(context, accumulator, value, index, collection);
};
}
-
- function _has(obj, path) {
- return obj != null && hasOwnProperty.call(obj, path);
- }
-
- 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]];
+ return function() {
+ return func.apply(context, arguments);
+ };
+}
+
+// An internal function to generate callbacks that can be applied to each
+// element in a collection, returning the desired result — either `identity`,
+// an arbitrary callback, a property matcher, or a property accessor.
+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);
+}
+
+// External wrapper for our callback generator. Users may customize
+// `_.iteratee` if they want additional predicate/iteratee shorthand styles.
+// This abstraction hides the internal-only argCount argument.
+_.iteratee = iteratee;
+export function iteratee(value, context) {
+ return baseIteratee(value, context, Infinity);
+}
+
+// The function we actually call internally. It invokes _.iteratee if
+// overridden, otherwise baseIteratee.
+function cb(value, context, argCount) {
+ if (_.iteratee !== iteratee) return _.iteratee(value, context);
+ return baseIteratee(value, context, argCount);
+}
+
+// Some functions take a variable number of arguments, or a few expected
+// arguments at the beginning and then a variable number of values to operate
+// on. This helper accumulates all remaining arguments past the function’s
+// argument length (or an explicit `startIndex`), into an array that becomes
+// the last argument. Similar to ES6’s "rest parameter".
+export 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];
}
- return length ? obj : void 0;
- }
-
- // Helper for collection methods to determine whether a collection
- // should be iterated as an array or as an object.
- // Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength
- // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094
- var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;
- var getLength = shallowProperty('length');
- function isArrayLike(collection) {
- var length = getLength(collection);
- return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX;
- }
-
- // Collection Functions
- // --------------------
-
- // The cornerstone, an `each` implementation, aka `forEach`.
- // Handles raw objects in addition to array-likes. Treats all
- // sparse array-likes as if they were dense.
- export { each as forEach };
- export 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);
- }
- } else {
- var _keys = keys(obj);
- for (i = 0, length = _keys.length; i < length; i++) {
- iteratee(obj[_keys[i]], _keys[i], obj);
- }
+ 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);
}
- return obj;
- }
-
- // Return the results of applying the iteratee to each element.
- export { map as collect };
- export 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);
+ var args = Array(startIndex + 1);
+ for (index = 0; index < startIndex; index++) {
+ args[index] = arguments[index];
}
- return results;
- }
-
- // Create a reducing function iterating left or right.
- function createReduce(dir) {
- // Wrap code that reassigns argument variables in a separate function than
- // the one that accesses `arguments.length` to avoid a perf hit. (#1991)
- 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];
- index += dir;
- }
- for (; index >= 0 && index < length; index += dir) {
- var currentKey = _keys ? _keys[index] : index;
- 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);
- };
- }
-
- // **Reduce** builds up a single result from a list of values, aka `inject`,
- // or `foldl`.
- export var reduce = createReduce(1);
- export { reduce as foldl, reduce as inject };
-
- // The right-associative version of reduce, also known as `foldr`.
- export var reduceRight = createReduce(-1);
- export { reduceRight as foldr };
-
- // Return the first value which passes a truth test.
- export { find as detect };
- export 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];
- }
-
- // Return all the elements that pass a truth test.
- export { filter as select };
- export 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);
- });
- return results;
- }
-
- // Return all the elements for which a truth test fails.
- export function reject(obj, predicate, context) {
- return filter(obj, negate(cb(predicate)), context);
- }
-
- // Determine whether all of the elements match a truth test.
- export { every as all };
- export 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;
+ args[startIndex] = rest;
+ return func.apply(this, args);
+ };
+}
+
+// An internal function for creating a new object that inherits from another.
+function baseCreate(prototype) {
+ if (!isObject(prototype)) return {};
+ if (nativeCreate) return nativeCreate(prototype);
+ Ctor.prototype = prototype;
+ var result = new Ctor;
+ Ctor.prototype = null;
+ return result;
+}
+
+function shallowProperty(key) {
+ return function(obj) {
+ return obj == null ? void 0 : obj[key];
+ };
+}
+
+function _has(obj, path) {
+ return obj != null && hasOwnProperty.call(obj, path);
+}
+
+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]];
+ }
+ return length ? obj : void 0;
+}
+
+// Helper for collection methods to determine whether a collection
+// should be iterated as an array or as an object.
+// Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength
+// Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094
+var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;
+var getLength = shallowProperty('length');
+function isArrayLike(collection) {
+ var length = getLength(collection);
+ return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX;
+}
+
+// Collection Functions
+// --------------------
+
+// The cornerstone, an `each` implementation, aka `forEach`.
+// Handles raw objects in addition to array-likes. Treats all
+// sparse array-likes as if they were dense.
+export { each as forEach };
+export 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);
+ }
+ } else {
+ var _keys = keys(obj);
+ for (i = 0, length = _keys.length; i < length; i++) {
+ iteratee(obj[_keys[i]], _keys[i], obj);
}
- return true;
}
-
- // Determine if at least one element in the object matches a truth test.
- export { some as any };
- export function some(obj, predicate, context) {
- predicate = cb(predicate, context);
+ return obj;
+}
+
+// Return the results of applying the iteratee to each element.
+export { map as collect };
+export 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);
+ }
+ return results;
+}
+
+// Create a reducing function iterating left or right.
+function createReduce(dir) {
+ // Wrap code that reassigns argument variables in a separate function than
+ // the one that accesses `arguments.length` to avoid a perf hit. (#1991)
+ var reducer = function(obj, iteratee, memo, initial) {
var _keys = !isArrayLike(obj) && keys(obj),
- length = (_keys || obj).length;
- for (var index = 0; index < length; index++) {
+ length = (_keys || obj).length,
+ index = dir > 0 ? 0 : length - 1;
+ if (!initial) {
+ memo = obj[_keys ? _keys[index] : index];
+ index += dir;
+ }
+ for (; index >= 0 && index < length; index += dir) {
var currentKey = _keys ? _keys[index] : index;
- if (predicate(obj[currentKey], currentKey, obj)) return true;
+ memo = iteratee(memo, obj[currentKey], currentKey, obj);
}
- return false;
- }
-
- // Determine if the array or object contains a given item (using `===`).
- export { contains as includes, contains as include };
- export 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;
- }
+ return memo;
+ };
- // Invoke a method (with arguments) on every item in a collection.
- export var invoke = restArguments(function(obj, path, args) {
- var contextPath, func;
- if (isFunction(path)) {
- func = path;
- } else if (isArray(path)) {
- contextPath = path.slice(0, -1);
- path = path[path.length - 1];
- }
- return map(obj, function(context) {
- var method = func;
- if (!method) {
- 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 function(obj, iteratee, memo, context) {
+ var initial = arguments.length >= 3;
+ return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);
+ };
+}
+
+// **Reduce** builds up a single result from a list of values, aka `inject`,
+// or `foldl`.
+export var reduce = createReduce(1);
+export { reduce as foldl, reduce as inject };
+
+// The right-associative version of reduce, also known as `foldr`.
+export var reduceRight = createReduce(-1);
+export { reduceRight as foldr };
+
+// Return the first value which passes a truth test.
+export { find as detect };
+export 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];
+}
+
+// Return all the elements that pass a truth test.
+export { filter as select };
+export 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);
});
-
- // Convenience version of a common use case of `map`: fetching a property.
- export function pluck(obj, key) {
- return map(obj, property(key));
- }
-
- // Convenience version of a common use case of `filter`: selecting only objects
- // containing specific `key:value` pairs.
- export function where(obj, attrs) {
- return filter(obj, matcher(attrs));
- }
-
- // Convenience version of a common use case of `find`: getting the first object
- // containing specific `key:value` pairs.
- export function findWhere(obj, attrs) {
- return find(obj, matcher(attrs));
- }
-
- // Return the maximum element (or element-based computation).
- export 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++) {
- value = obj[i];
- if (value != null && value > result) {
- result = value;
- }
+ return results;
+}
+
+// Return all the elements for which a truth test fails.
+export function reject(obj, predicate, context) {
+ return filter(obj, negate(cb(predicate)), context);
+}
+
+// Determine whether all of the elements match a truth test.
+export { every as all };
+export 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;
+ }
+ return true;
+}
+
+// Determine if at least one element in the object matches a truth test.
+export { some as any };
+export 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;
+ }
+ return false;
+}
+
+// Determine if the array or object contains a given item (using `===`).
+export { contains as includes, contains as include };
+export 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;
+}
+
+// Invoke a method (with arguments) on every item in a collection.
+export var invoke = restArguments(function(obj, path, args) {
+ var contextPath, func;
+ if (isFunction(path)) {
+ func = path;
+ } else if (isArray(path)) {
+ contextPath = path.slice(0, -1);
+ path = path[path.length - 1];
+ }
+ return map(obj, function(context) {
+ var method = func;
+ if (!method) {
+ if (contextPath && contextPath.length) {
+ context = deepGet(context, contextPath);
}
- } else {
- 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;
- }
- });
+ if (context == null) return void 0;
+ method = context[path];
}
- return result;
- }
-
- // Return the minimum element (or element-based computation).
- export 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++) {
- value = obj[i];
- if (value != null && value < result) {
- result = value;
- }
+ return method == null ? method : method.apply(context, args);
+ });
+});
+
+// Convenience version of a common use case of `map`: fetching a property.
+export function pluck(obj, key) {
+ return map(obj, property(key));
+}
+
+// Convenience version of a common use case of `filter`: selecting only objects
+// containing specific `key:value` pairs.
+export function where(obj, attrs) {
+ return filter(obj, matcher(attrs));
+}
+
+// Convenience version of a common use case of `find`: getting the first object
+// containing specific `key:value` pairs.
+export function findWhere(obj, attrs) {
+ return find(obj, matcher(attrs));
+}
+
+// Return the maximum element (or element-based computation).
+export 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++) {
+ 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) {
- result = v;
- lastComputed = computed;
- }
- });
- }
- return result;
- }
-
- // Shuffle a collection.
- export function shuffle(obj) {
- return sample(obj, Infinity);
- }
-
- // Sample **n** random values from a collection using the modern version of the
- // [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle).
- // If **n** is not specified, returns a single random element.
- // The internal `guard` argument allows it to work with `map`.
- export function sample(obj, n, guard) {
- if (n == null || guard) {
- if (!isArrayLike(obj)) obj = values(obj);
- return obj[random(obj.length - 1)];
- }
- var sample = isArrayLike(obj) ? clone(obj) : values(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);
- }
-
- // Sort the object's values by a criterion produced by an iteratee.
- export function sortBy(obj, iteratee, context) {
- var index = 0;
+ } else {
iteratee = cb(iteratee, context);
- return pluck(map(obj, function(value, key, list) {
- return {
- value: value,
- index: index++,
- criteria: iteratee(value, key, list)
- };
- }).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;
+ each(obj, function(v, index, list) {
+ computed = iteratee(v, index, list);
+ if (computed > lastComputed || computed === -Infinity && result === -Infinity) {
+ result = v;
+ lastComputed = computed;
}
- return left.index - right.index;
- }), 'value');
- }
-
- // An internal function used for aggregate "group by" operations.
- 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);
- });
- return result;
- };
- }
-
- // Groups the object's values by a criterion. Pass either a string attribute
- // to group by, or a function that returns the criterion.
- export var groupBy = group(function(result, value, key) {
- if (_has(result, key)) result[key].push(value); else result[key] = [value];
- });
-
- // Indexes the object's values by a criterion, similar to `groupBy`, but for
- // when you know that your index values will be unique.
- export var indexBy = group(function(result, value, key) {
- result[key] = value;
- });
-
- // Counts instances of an object that group by a certain criterion. Pass
- // either a string attribute to count by, or a function that returns the
- // criterion.
- export var countBy = group(function(result, value, key) {
- if (_has(result, key)) result[key]++; else result[key] = 1;
- });
-
- var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;
- // Safely create a real, live array from anything iterable.
- export function toArray(obj) {
- if (!obj) return [];
- if (isArray(obj)) return slice.call(obj);
- if (isString(obj)) {
- // Keep surrogate pair characters together
- return obj.match(reStrSymbol);
- }
- if (isArrayLike(obj)) return map(obj, identity);
- return values(obj);
- }
-
- // Return the number of elements in an object.
- export function size(obj) {
- if (obj == null) return 0;
- return isArrayLike(obj) ? obj.length : keys(obj).length;
- }
-
- // Split a collection into two arrays: one whose elements all satisfy the given
- // predicate, and one whose elements all do not satisfy the predicate.
- export var partition = group(function(result, value, pass) {
- result[pass ? 0 : 1].push(value);
- }, true);
-
- // Array Functions
- // ---------------
-
- // Get the first element of an array. Passing **n** will return the first N
- // values in the array. The **guard** check allows it to work with `map`.
- export { first as head, first as take };
- export function first(array, n, guard) {
- if (array == null || array.length < 1) return n == null ? void 0 : [];
- if (n == null || guard) return array[0];
- return initial(array, array.length - n);
- }
-
- // Returns everything but the last entry of the array. Especially useful on
- // the arguments object. Passing **n** will return all the values in
- // the array, excluding the last N.
- export function initial(array, n, guard) {
- return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
- }
-
- // Get the last element of an array. Passing **n** will return the last N
- // values in the array.
- export function last(array, n, guard) {
- if (array == null || array.length < 1) return n == null ? void 0 : [];
- if (n == null || guard) return array[array.length - 1];
- return rest(array, Math.max(0, array.length - n));
- }
-
- // Returns everything but the first entry of the array. Especially useful on
- // the arguments object. Passing an **n** will return the rest N values in the
- // array.
- export { rest as tail, rest as drop };
- export function rest(array, n, guard) {
- return slice.call(array, n == null || guard ? 1 : n);
- }
-
- // Trim out all falsy values from an array.
- export function compact(array) {
- return filter(array, Boolean);
+ });
}
-
- // Internal implementation of a recursive `flatten` function.
- function _flatten(input, shallow, strict, output) {
- output = output || [];
- 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))) {
- // Flatten current level of array or arguments object.
- if (shallow) {
- var j = 0, len = value.length;
- while (j < len) output[idx++] = value[j++];
- } else {
- _flatten(value, shallow, strict, output);
- idx = output.length;
- }
- } else if (!strict) {
- output[idx++] = value;
+ return result;
+}
+
+// Return the minimum element (or element-based computation).
+export 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++) {
+ value = obj[i];
+ if (value != null && value < result) {
+ result = value;
}
}
- return output;
- }
-
- // Flatten out an array, either recursively (by default), or just one level.
- export function flatten(array, shallow) {
- return _flatten(array, shallow, false);
- }
-
- // Return a version of the array that does not contain the specified value(s).
- export var without = restArguments(function(array, otherArrays) {
- return difference(array, otherArrays);
- });
-
- // Produce a duplicate-free version of the array. If the array has already
- // been sorted, you have the option of using a faster algorithm.
- // The faster algorithm will not work with an iteratee if the iteratee
- // is not a one-to-one function, so providing an iteratee will disable
- // the faster algorithm.
- export { uniq as unique };
- export function uniq(array, isSorted, iteratee, context) {
- if (!isBoolean(isSorted)) {
- context = iteratee;
- iteratee = isSorted;
- isSorted = false;
- }
- if (iteratee != null) iteratee = cb(iteratee, context);
- var result = [];
- var seen = [];
- for (var i = 0, length = getLength(array); i < length; i++) {
- var value = array[i],
- computed = iteratee ? iteratee(value, i, array) : value;
- if (isSorted && !iteratee) {
- if (!i || seen !== computed) result.push(value);
- seen = computed;
- } else if (iteratee) {
- if (!contains(seen, computed)) {
- seen.push(computed);
- result.push(value);
- }
- } else if (!contains(result, value)) {
- result.push(value);
+ } else {
+ 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;
}
- }
- return result;
+ });
}
+ return result;
+}
- // Produce an array that contains the union: each distinct element from all of
- // the passed-in arrays.
- export var union = restArguments(function(arrays) {
- return uniq(_flatten(arrays, true, true));
- });
+// Shuffle a collection.
+export function shuffle(obj) {
+ return sample(obj, Infinity);
+}
- // Produce an array that contains every item shared between all the
- // passed-in arrays.
- export function intersection(array) {
- var result = [];
- var argsLength = arguments.length;
- for (var i = 0, length = getLength(array); i < length; i++) {
- var item = array[i];
- if (contains(result, item)) continue;
- var j;
- for (j = 1; j < argsLength; j++) {
- if (!contains(arguments[j], item)) break;
- }
- if (j === argsLength) result.push(item);
+// Sample **n** random values from a collection using the modern version of the
+// [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle).
+// If **n** is not specified, returns a single random element.
+// The internal `guard` argument allows it to work with `map`.
+export function sample(obj, n, guard) {
+ if (n == null || guard) {
+ if (!isArrayLike(obj)) obj = values(obj);
+ return obj[random(obj.length - 1)];
+ }
+ var sample = isArrayLike(obj) ? clone(obj) : values(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);
+}
+
+// Sort the object's values by a criterion produced by an iteratee.
+export function sortBy(obj, iteratee, context) {
+ var index = 0;
+ iteratee = cb(iteratee, context);
+ return pluck(map(obj, function(value, key, list) {
+ return {
+ value: value,
+ index: index++,
+ criteria: iteratee(value, key, list)
+ };
+ }).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;
}
- return result;
- }
-
- // Take the difference between one array and a number of other arrays.
- // Only the elements present in just the first array will remain.
- export var difference = restArguments(function(array, rest) {
- rest = _flatten(rest, true, true);
- return filter(array, function(value){
- return !contains(rest, value);
+ return left.index - right.index;
+ }), 'value');
+}
+
+// An internal function used for aggregate "group by" operations.
+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);
});
- });
-
- // Complement of zip. Unzip accepts an array of arrays and groups
- // each array's elements on shared indices.
- export 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);
- }
return result;
- }
-
- // Zip together multiple lists into a single array -- elements that share
- // an index go together.
- export var zip = restArguments(unzip);
-
- // Converts lists into objects. Pass either a single array of `[key, value]`
- // pairs, or two parallel arrays of the same length -- one of keys, and one of
- // the corresponding values. Passing by pairs is the reverse of pairs.
- export function object(list, values) {
- var result = {};
- for (var i = 0, length = getLength(list); i < length; i++) {
- if (values) {
- result[list[i]] = values[i];
+ };
+}
+
+// Groups the object's values by a criterion. Pass either a string attribute
+// to group by, or a function that returns the criterion.
+export var groupBy = group(function(result, value, key) {
+ if (_has(result, key)) result[key].push(value); else result[key] = [value];
+});
+
+// Indexes the object's values by a criterion, similar to `groupBy`, but for
+// when you know that your index values will be unique.
+export var indexBy = group(function(result, value, key) {
+ result[key] = value;
+});
+
+// Counts instances of an object that group by a certain criterion. Pass
+// either a string attribute to count by, or a function that returns the
+// criterion.
+export var countBy = group(function(result, value, key) {
+ if (_has(result, key)) result[key]++; else result[key] = 1;
+});
+
+var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;
+// Safely create a real, live array from anything iterable.
+export function toArray(obj) {
+ if (!obj) return [];
+ if (isArray(obj)) return slice.call(obj);
+ if (isString(obj)) {
+ // Keep surrogate pair characters together
+ return obj.match(reStrSymbol);
+ }
+ if (isArrayLike(obj)) return map(obj, identity);
+ return values(obj);
+}
+
+// Return the number of elements in an object.
+export function size(obj) {
+ if (obj == null) return 0;
+ return isArrayLike(obj) ? obj.length : keys(obj).length;
+}
+
+// Split a collection into two arrays: one whose elements all satisfy the given
+// predicate, and one whose elements all do not satisfy the predicate.
+export var partition = group(function(result, value, pass) {
+ result[pass ? 0 : 1].push(value);
+}, true);
+
+// Array Functions
+// ---------------
+
+// Get the first element of an array. Passing **n** will return the first N
+// values in the array. The **guard** check allows it to work with `map`.
+export { first as head, first as take };
+export function first(array, n, guard) {
+ if (array == null || array.length < 1) return n == null ? void 0 : [];
+ if (n == null || guard) return array[0];
+ return initial(array, array.length - n);
+}
+
+// Returns everything but the last entry of the array. Especially useful on
+// the arguments object. Passing **n** will return all the values in
+// the array, excluding the last N.
+export function initial(array, n, guard) {
+ return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
+}
+
+// Get the last element of an array. Passing **n** will return the last N
+// values in the array.
+export function last(array, n, guard) {
+ if (array == null || array.length < 1) return n == null ? void 0 : [];
+ if (n == null || guard) return array[array.length - 1];
+ return rest(array, Math.max(0, array.length - n));
+}
+
+// Returns everything but the first entry of the array. Especially useful on
+// the arguments object. Passing an **n** will return the rest N values in the
+// array.
+export { rest as tail, rest as drop };
+export function rest(array, n, guard) {
+ return slice.call(array, n == null || guard ? 1 : n);
+}
+
+// Trim out all falsy values from an array.
+export function compact(array) {
+ return filter(array, Boolean);
+}
+
+// Internal implementation of a recursive `flatten` function.
+function _flatten(input, shallow, strict, output) {
+ output = output || [];
+ 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))) {
+ // Flatten current level of array or arguments object.
+ if (shallow) {
+ var j = 0, len = value.length;
+ while (j < len) output[idx++] = value[j++];
} else {
- result[list[i][0]] = list[i][1];
+ _flatten(value, shallow, strict, output);
+ idx = output.length;
}
+ } else if (!strict) {
+ output[idx++] = value;
}
- return result;
}
-
- // Generator function to create the findIndex and findLastIndex functions.
- 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;
- };
- }
-
- // Returns the first index on an array-like that passes a predicate test.
- export var findIndex = createPredicateIndexFinder(1);
- export var findLastIndex = createPredicateIndexFinder(-1);
-
- // Use a comparator function to figure out the smallest index at which
- // an object should be inserted so as to maintain order. Uses binary search.
- export 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;
- }
-
- // Generator function to create the indexOf and lastIndexOf functions.
- 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);
- } else {
- 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;
- }
- if (item !== item) {
- 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 output;
+}
+
+// Flatten out an array, either recursively (by default), or just one level.
+export function flatten(array, shallow) {
+ return _flatten(array, shallow, false);
+}
+
+// Return a version of the array that does not contain the specified value(s).
+export var without = restArguments(function(array, otherArrays) {
+ return difference(array, otherArrays);
+});
+
+// Produce a duplicate-free version of the array. If the array has already
+// been sorted, you have the option of using a faster algorithm.
+// The faster algorithm will not work with an iteratee if the iteratee
+// is not a one-to-one function, so providing an iteratee will disable
+// the faster algorithm.
+export { uniq as unique };
+export function uniq(array, isSorted, iteratee, context) {
+ if (!isBoolean(isSorted)) {
+ context = iteratee;
+ iteratee = isSorted;
+ isSorted = false;
+ }
+ if (iteratee != null) iteratee = cb(iteratee, context);
+ var result = [];
+ var seen = [];
+ for (var i = 0, length = getLength(array); i < length; i++) {
+ var value = array[i],
+ computed = iteratee ? iteratee(value, i, array) : value;
+ if (isSorted && !iteratee) {
+ if (!i || seen !== computed) result.push(value);
+ seen = computed;
+ } else if (iteratee) {
+ if (!contains(seen, computed)) {
+ seen.push(computed);
+ result.push(value);
}
- return -1;
- };
- }
-
- // Return the position of the first occurrence of an item in an array,
- // or -1 if the item is not included in the array.
- // If the array is large and already in sort order, pass `true`
- // for **isSorted** to use binary search.
- export var indexOf = createIndexFinder(1, findIndex, sortedIndex);
- export var lastIndexOf = createIndexFinder(-1, findLastIndex);
-
- // Generate an integer Array containing an arithmetic progression. A port of
- // the native Python `range()` function. See
- // [the Python documentation](https://docs.python.org/library/functions.html#range).
- export function range(start, stop, step) {
- if (stop == null) {
- stop = start || 0;
- start = 0;
- }
- if (!step) {
- step = stop < start ? -1 : 1;
+ } else if (!contains(result, value)) {
+ result.push(value);
}
-
- 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;
- }
-
- return range;
}
-
- // Chunk a single array into multiple arrays, each containing `count` or fewer
- // items.
- export function chunk(array, count) {
- if (count == null || count < 1) return [];
- var result = [];
- var i = 0, length = array.length;
- while (i < length) {
- result.push(slice.call(array, i, i += count));
+ return result;
+}
+
+// Produce an array that contains the union: each distinct element from all of
+// the passed-in arrays.
+export var union = restArguments(function(arrays) {
+ return uniq(_flatten(arrays, true, true));
+});
+
+// Produce an array that contains every item shared between all the
+// passed-in arrays.
+export function intersection(array) {
+ var result = [];
+ var argsLength = arguments.length;
+ for (var i = 0, length = getLength(array); i < length; i++) {
+ var item = array[i];
+ if (contains(result, item)) continue;
+ var j;
+ for (j = 1; j < argsLength; j++) {
+ if (!contains(arguments[j], item)) break;
}
- return result;
+ if (j === argsLength) result.push(item);
}
+ return result;
+}
- // Function (ahem) Functions
- // ------------------
-
- // Determines whether to execute a function as a constructor
- // or a normal function with the provided arguments.
- 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;
- }
-
- // Create a function bound to a given object (assigning `this`, and arguments,
- // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if
- // available.
- export var bind = 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;
- });
-
- // Partially apply a function by creating a version that has had some of its
- // arguments pre-filled, without changing its dynamic `this` context. _ acts
- // as a placeholder by default, allowing any combination of arguments to be
- // pre-filled. Set `partial.placeholder` for a custom placeholder argument.
- export 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];
- }
- while (position < arguments.length) args.push(arguments[position++]);
- return executeBound(func, bound, this, this, args);
- };
- return bound;
+// Take the difference between one array and a number of other arrays.
+// Only the elements present in just the first array will remain.
+export var difference = restArguments(function(array, rest) {
+ rest = _flatten(rest, true, true);
+ return filter(array, function(value){
+ return !contains(rest, value);
});
-
- partial.placeholder = _;
-
- // Bind a number of an object's methods to that object. Remaining arguments
- // are the method names to be bound. Useful for ensuring that all callbacks
- // defined on an object belong to it.
- export var bindAll = 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);
+});
+
+// Complement of zip. Unzip accepts an array of arrays and groups
+// each array's elements on shared indices.
+export 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);
+ }
+ return result;
+}
+
+// Zip together multiple lists into a single array -- elements that share
+// an index go together.
+export var zip = restArguments(unzip);
+
+// Converts lists into objects. Pass either a single array of `[key, value]`
+// pairs, or two parallel arrays of the same length -- one of keys, and one of
+// the corresponding values. Passing by pairs is the reverse of pairs.
+export function object(list, values) {
+ var result = {};
+ for (var i = 0, length = getLength(list); i < length; i++) {
+ if (values) {
+ result[list[i]] = values[i];
+ } else {
+ result[list[i][0]] = list[i][1];
}
- });
-
- // Memoize an expensive function by storing its results.
- export 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 = {};
- return memoize;
- }
-
- // Delays a function for the given number of milliseconds, and then calls
- // it with the arguments supplied.
- export var delay = restArguments(function(func, wait, args) {
- return setTimeout(function() {
- return func.apply(null, args);
- }, wait);
- });
-
- // Defers a function, scheduling it to run after the current call stack has
- // cleared.
- export var defer = partial(delay, _, 1);
-
- // Returns a function, that, when invoked, will only be triggered at most once
- // during a given window of time. Normally, the throttled function will run
- // as much as it can, without ever going more than once per `wait` duration;
- // but if you'd like to disable the execution on the leading edge, pass
- // `{leading: false}`. To disable execution on the trailing edge, ditto.
- export 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();
- timeout = null;
- result = func.apply(context, args);
- if (!timeout) context = args = null;
- };
-
- var throttled = function() {
- var _now = now();
- if (!previous && options.leading === false) previous = _now;
- var remaining = wait - (_now - previous);
- context = this;
- args = arguments;
- if (remaining <= 0 || remaining > wait) {
- if (timeout) {
- clearTimeout(timeout);
- timeout = null;
- }
- previous = _now;
- result = func.apply(context, args);
- if (!timeout) context = args = null;
- } else if (!timeout && options.trailing !== false) {
- timeout = setTimeout(later, remaining);
- }
- return result;
- };
-
- throttled.cancel = function() {
- clearTimeout(timeout);
- previous = 0;
- timeout = context = args = null;
- };
-
- return throttled;
}
+ return result;
+}
- // Returns a function, that, as long as it continues to be invoked, will not
- // be triggered. The function will be called after it stops being called for
- // N milliseconds. If `immediate` is passed, trigger the function on the
- // leading edge, instead of the trailing.
- export function debounce(func, wait, immediate) {
- var timeout, result;
-
- var later = function(context, args) {
- timeout = null;
- if (args) result = func.apply(context, args);
- };
-
- var debounced = restArguments(function(args) {
- if (timeout) clearTimeout(timeout);
- if (immediate) {
- var callNow = !timeout;
- timeout = setTimeout(later, wait);
- if (callNow) result = func.apply(this, args);
+// Generator function to create the findIndex and findLastIndex functions.
+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;
+ };
+}
+
+// Returns the first index on an array-like that passes a predicate test.
+export var findIndex = createPredicateIndexFinder(1);
+export var findLastIndex = createPredicateIndexFinder(-1);
+
+// Use a comparator function to figure out the smallest index at which
+// an object should be inserted so as to maintain order. Uses binary search.
+export 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;
+}
+
+// Generator function to create the indexOf and lastIndexOf functions.
+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);
} else {
- timeout = delay(later, wait, this, args);
- }
-
- return result;
- });
-
- debounced.cancel = function() {
- clearTimeout(timeout);
- timeout = null;
- };
-
- return debounced;
- }
-
- // Returns the first function passed as an argument to the second,
- // allowing you to adjust arguments, run code before and after, and
- // conditionally execute the original function.
- export function wrap(func, wrapper) {
- return partial(wrapper, func);
- }
-
- // Returns a negated version of the passed-in predicate.
- export function negate(predicate) {
- return function() {
- return !predicate.apply(this, arguments);
- };
- }
-
- // Returns a function that is the composition of a list of functions, each
- // consuming the return value of the function that follows.
- export 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);
- return result;
- };
- }
-
- // Returns a function that will only be executed on and after the Nth call.
- export function after(times, func) {
- return function() {
- if (--times < 1) {
- return func.apply(this, arguments);
- }
- };
- }
-
- // Returns a function that will only be executed up to (but not including) the Nth call.
- export function before(times, func) {
- var memo;
- return function() {
- if (--times > 0) {
- memo = func.apply(this, arguments);
- }
- if (times <= 1) func = null;
- return memo;
- };
- }
-
- // Returns a function that will be executed at most one time, no matter how
- // often you call it. Useful for lazy initialization.
- export var once = partial(before, 2);
-
- // Object Functions
- // ----------------
-
- // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.
- var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');
- var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',
- 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
-
- function collectNonEnumProps(obj, _keys) {
- var nonEnumIdx = nonEnumerableProps.length;
- var constructor = obj.constructor;
- var proto = isFunction(constructor) && constructor.prototype || ObjProto;
-
- // Constructor is a special case.
- var prop = 'constructor';
- if (_has(obj, prop) && !contains(_keys, prop)) _keys.push(prop);
-
- while (nonEnumIdx--) {
- prop = nonEnumerableProps[nonEnumIdx];
- if (prop in obj && obj[prop] !== proto[prop] && !contains(_keys, prop)) {
- _keys.push(prop);
+ 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;
}
- }
-
- // Retrieve the names of an object's own properties.
- // Delegates to **ECMAScript 5**'s native `Object.keys`.
- export 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);
- // Ahem, IE < 9.
- if (hasEnumBug) collectNonEnumProps(obj, _keys);
- return _keys;
- }
-
- // Retrieve all the property names of an object.
- export function allKeys(obj) {
- if (!isObject(obj)) return [];
- var _keys = [];
- for (var key in obj) _keys.push(key);
- // Ahem, IE < 9.
- if (hasEnumBug) collectNonEnumProps(obj, _keys);
- return _keys;
- }
-
- // Retrieve the values of an object's properties.
- export 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]];
+ if (item !== item) {
+ idx = predicateFind(slice.call(array, i, length), isNaN);
+ return idx >= 0 ? idx + i : -1;
}
- return values;
- }
-
- // Returns the results of applying the iteratee to each element of the object.
- // In contrast to map it returns an object.
- export 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);
+ for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {
+ if (array[idx] === item) return idx;
}
- return results;
- }
-
- // Convert an object into a list of `[key, value]` pairs.
- // The opposite of object.
- export function pairs(obj) {
- var _keys = keys(obj);
- var length = _keys.length;
- var pairs = Array(length);
+ return -1;
+ };
+}
+
+// Return the position of the first occurrence of an item in an array,
+// or -1 if the item is not included in the array.
+// If the array is large and already in sort order, pass `true`
+// for **isSorted** to use binary search.
+export var indexOf = createIndexFinder(1, findIndex, sortedIndex);
+export var lastIndexOf = createIndexFinder(-1, findLastIndex);
+
+// Generate an integer Array containing an arithmetic progression. A port of
+// the native Python `range()` function. See
+// [the Python documentation](https://docs.python.org/library/functions.html#range).
+export function range(start, stop, step) {
+ if (stop == null) {
+ stop = start || 0;
+ start = 0;
+ }
+ if (!step) {
+ step = stop < start ? -1 : 1;
+ }
+
+ 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;
+ }
+
+ return range;
+}
+
+// Chunk a single array into multiple arrays, each containing `count` or fewer
+// items.
+export function chunk(array, count) {
+ if (count == null || count < 1) return [];
+ var result = [];
+ var i = 0, length = array.length;
+ while (i < length) {
+ result.push(slice.call(array, i, i += count));
+ }
+ return result;
+}
+
+// Function (ahem) Functions
+// ------------------
+
+// Determines whether to execute a function as a constructor
+// or a normal function with the provided arguments.
+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;
+}
+
+// Create a function bound to a given object (assigning `this`, and arguments,
+// optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if
+// available.
+export var bind = 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;
+});
+
+// Partially apply a function by creating a version that has had some of its
+// arguments pre-filled, without changing its dynamic `this` context. _ acts
+// as a placeholder by default, allowing any combination of arguments to be
+// pre-filled. Set `partial.placeholder` for a custom placeholder argument.
+export 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++) {
- pairs[i] = [_keys[i], obj[_keys[i]]];
+ args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];
}
- return pairs;
- }
+ while (position < arguments.length) args.push(arguments[position++]);
+ return executeBound(func, bound, this, this, args);
+ };
+ return bound;
+});
+
+partial.placeholder = _;
+
+// Bind a number of an object's methods to that object. Remaining arguments
+// are the method names to be bound. Useful for ensuring that all callbacks
+// defined on an object belong to it.
+export var bindAll = 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);
+ }
+});
+
+// Memoize an expensive function by storing its results.
+export 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 = {};
+ return memoize;
+}
+
+// Delays a function for the given number of milliseconds, and then calls
+// it with the arguments supplied.
+export var delay = restArguments(function(func, wait, args) {
+ return setTimeout(function() {
+ return func.apply(null, args);
+ }, wait);
+});
+
+// Defers a function, scheduling it to run after the current call stack has
+// cleared.
+export var defer = partial(delay, _, 1);
+
+// Returns a function, that, when invoked, will only be triggered at most once
+// during a given window of time. Normally, the throttled function will run
+// as much as it can, without ever going more than once per `wait` duration;
+// but if you'd like to disable the execution on the leading edge, pass
+// `{leading: false}`. To disable execution on the trailing edge, ditto.
+export 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();
+ timeout = null;
+ result = func.apply(context, args);
+ if (!timeout) context = args = null;
+ };
- // Invert the keys and values of an object. The values must be serializable.
- export function invert(obj) {
- var result = {};
- var _keys = keys(obj);
- for (var i = 0, length = _keys.length; i < length; i++) {
- result[obj[_keys[i]]] = _keys[i];
+ var throttled = function() {
+ var _now = now();
+ if (!previous && options.leading === false) previous = _now;
+ var remaining = wait - (_now - previous);
+ context = this;
+ args = arguments;
+ if (remaining <= 0 || remaining > wait) {
+ if (timeout) {
+ clearTimeout(timeout);
+ timeout = null;
+ }
+ previous = _now;
+ result = func.apply(context, args);
+ if (!timeout) context = args = null;
+ } else if (!timeout && options.trailing !== false) {
+ timeout = setTimeout(later, remaining);
}
return result;
- }
-
- // Return a sorted list of the function names available on the object.
- export { functions as methods };
- export function functions(obj) {
- var names = [];
- for (var key in obj) {
- if (isFunction(obj[key])) names.push(key);
- }
- return names.sort();
- }
+ };
- // An internal function for creating assigner functions.
- 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;
- for (var i = 0; i < l; i++) {
- var key = _keys[i];
- if (!defaults || obj[key] === void 0) obj[key] = source[key];
- }
- }
- return obj;
- };
- }
+ throttled.cancel = function() {
+ clearTimeout(timeout);
+ previous = 0;
+ timeout = context = args = null;
+ };
- // Extend a given object with all the properties in passed-in object(s).
- export var extend = createAssigner(allKeys);
+ return throttled;
+}
- // Assigns a given object with all the own properties in the passed-in object(s).
- // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
- export var extendOwn = createAssigner(keys);
- export { extendOwn as assign };
+// Returns a function, that, as long as it continues to be invoked, will not
+// be triggered. The function will be called after it stops being called for
+// N milliseconds. If `immediate` is passed, trigger the function on the
+// leading edge, instead of the trailing.
+export function debounce(func, wait, immediate) {
+ var timeout, result;
- // Returns the first key on an object that passes a predicate test.
- export 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;
- }
- }
-
- // Internal pick helper function to determine if `obj` has key `key`.
- function keyInObj(value, key, obj) {
- return key in obj;
- }
-
- // Return a copy of the object only containing the whitelisted properties.
- export var pick = 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);
- } else {
- iteratee = keyInObj;
- _keys = _flatten(_keys, false, false);
- obj = Object(obj);
- }
- 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;
- }
- return result;
- });
+ var later = function(context, args) {
+ timeout = null;
+ if (args) result = func.apply(context, args);
+ };
- // Return a copy of the object without the blacklisted properties.
- export var omit = restArguments(function(obj, _keys) {
- var iteratee = _keys[0], context;
- if (isFunction(iteratee)) {
- iteratee = negate(iteratee);
- if (_keys.length > 1) context = _keys[1];
+ var debounced = restArguments(function(args) {
+ if (timeout) clearTimeout(timeout);
+ if (immediate) {
+ var callNow = !timeout;
+ timeout = setTimeout(later, wait);
+ if (callNow) result = func.apply(this, args);
} else {
- _keys = map(_flatten(_keys, false, false), String);
- iteratee = function(value, key) {
- return !contains(_keys, key);
- };
+ timeout = delay(later, wait, this, args);
}
- return pick(obj, iteratee, context);
- });
-
- // Fill in a given object with default properties.
- export var defaults = createAssigner(allKeys, true);
- // Creates an object that inherits from the given prototype object.
- // If additional properties are provided then they will be added to the
- // created object.
- export function create(prototype, props) {
- var result = baseCreate(prototype);
- if (props) extendOwn(result, props);
return result;
- }
-
- // Create a (shallow-cloned) duplicate of an object.
- export function clone(obj) {
- if (!isObject(obj)) return obj;
- return isArray(obj) ? obj.slice() : extend({}, obj);
- }
-
- // Invokes interceptor with the obj, and then returns obj.
- // The primary purpose of this method is to "tap into" a method chain, in
- // order to perform operations on intermediate results within the chain.
- export function tap(obj, interceptor) {
- interceptor(obj);
- return obj;
- }
+ });
- // Returns whether an object has a given set of `key:value` pairs.
- export function isMatch(object, attrs) {
- var _keys = keys(attrs), length = _keys.length;
- if (object == null) return !length;
- 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;
- }
- return true;
- }
+ debounced.cancel = function() {
+ clearTimeout(timeout);
+ timeout = null;
+ };
+ return debounced;
+}
- // Internal recursive comparison function for `isEqual`.
- function eq(a, b, aStack, bStack) {
- // Identical objects are equal. `0 === -0`, but they aren't identical.
- // See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal).
- if (a === b) return a !== 0 || 1 / a === 1 / b;
- // `null` or `undefined` only equal to itself (strict comparison).
- if (a == null || b == null) return false;
- // `NaN`s are equivalent, but non-reflexive.
- if (a !== a) return b !== b;
- // Exhaust primitive checks
- var type = typeof a;
- if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;
- return deepEq(a, b, aStack, bStack);
- }
+// Returns the first function passed as an argument to the second,
+// allowing you to adjust arguments, run code before and after, and
+// conditionally execute the original function.
+export function wrap(func, wrapper) {
+ return partial(wrapper, func);
+}
- // Internal recursive comparison function for `isEqual`.
- function deepEq(a, b, aStack, bStack) {
- // Unwrap any wrapped objects.
- if (a instanceof _) a = a._wrapped;
- if (b instanceof _) b = b._wrapped;
- // Compare `[[Class]]` names.
- var className = toString.call(a);
- if (className !== toString.call(b)) return false;
- switch (className) {
- // Strings, numbers, regular expressions, dates, and booleans are compared by value.
- case '[object RegExp]':
- // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')
- case '[object String]':
- // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
- // equivalent to `new String("5")`.
- return '' + a === '' + b;
- case '[object Number]':
- // `NaN`s are equivalent, but non-reflexive.
- // Object(NaN) is equivalent to NaN.
- if (+a !== +a) return +b !== +b;
- // An `egal` comparison is performed for other numeric values.
- return +a === 0 ? 1 / +a === 1 / b : +a === +b;
- case '[object Date]':
- case '[object Boolean]':
- // Coerce dates and booleans to numeric primitive values. Dates are compared by their
- // millisecond representations. Note that invalid dates with millisecond representations
- // of `NaN` are not equivalent.
- return +a === +b;
- case '[object Symbol]':
- return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);
- }
+// Returns a negated version of the passed-in predicate.
+export function negate(predicate) {
+ return function() {
+ return !predicate.apply(this, arguments);
+ };
+}
+
+// Returns a function that is the composition of a list of functions, each
+// consuming the return value of the function that follows.
+export 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);
+ return result;
+ };
+}
- var areArrays = className === '[object Array]';
- if (!areArrays) {
- if (typeof a != 'object' || typeof b != 'object') return false;
-
- // Objects with different constructors are not equivalent, but `Object`s or `Array`s
- // from different frames are.
- 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;
- }
+// Returns a function that will only be executed on and after the Nth call.
+export function after(times, func) {
+ return function() {
+ if (--times < 1) {
+ return func.apply(this, arguments);
}
- // Assume equality for cyclic structures. The algorithm for detecting cyclic
- // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
-
- // Initializing stack of traversed objects.
- // It's done here since we only need them for objects and arrays comparison.
- aStack = aStack || [];
- bStack = bStack || [];
- var length = aStack.length;
- while (length--) {
- // Linear search. Performance is inversely proportional to the number of
- // unique nested structures.
- if (aStack[length] === a) return bStack[length] === b;
- }
-
- // Add the first object to the stack of traversed objects.
- aStack.push(a);
- bStack.push(b);
-
- // Recursively compare objects and arrays.
- if (areArrays) {
- // Compare array lengths to determine if a deep comparison is necessary.
- length = a.length;
- if (length !== b.length) return false;
- // Deep compare the contents, ignoring non-numeric properties.
- while (length--) {
- if (!eq(a[length], b[length], aStack, bStack)) return false;
- }
- } else {
- // Deep compare objects.
- var _keys = keys(a), key;
- length = _keys.length;
- // Ensure that both objects contain the same number of properties before comparing deep equality.
- if (keys(b).length !== length) return false;
- while (length--) {
- // Deep compare each member
- key = _keys[length];
- if (!(_has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
- }
+ };
+}
+
+// Returns a function that will only be executed up to (but not including) the Nth call.
+export function before(times, func) {
+ var memo;
+ return function() {
+ if (--times > 0) {
+ memo = func.apply(this, arguments);
}
- // Remove the first object from the stack of traversed objects.
- aStack.pop();
- bStack.pop();
- return true;
- }
-
- // Perform a deep comparison to check if two objects are equal.
- export function isEqual(a, b) {
- return eq(a, b);
- }
+ if (times <= 1) func = null;
+ return memo;
+ };
+}
- // Is a given array, string, or object empty?
- // An "empty" object has no enumerable own-properties.
- export function isEmpty(obj) {
- if (obj == null) return true;
- if (isArrayLike(obj) && (isArray(obj) || isString(obj) || isArguments(obj))) return obj.length === 0;
- return keys(obj).length === 0;
- }
+// Returns a function that will be executed at most one time, no matter how
+// often you call it. Useful for lazy initialization.
+export var once = partial(before, 2);
- // Is a given value a DOM element?
- export function isElement(obj) {
- return !!(obj && obj.nodeType === 1);
- }
+// Object Functions
+// ----------------
- // Internal function for creating a toString-based type tester.
- function tagTester(name) {
- return function(obj) {
- return toString.call(obj) === '[object ' + name + ']';
- };
- }
+// Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.
+var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');
+var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',
+ 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
- // Is a given value an array?
- // Delegates to ECMA5's native Array.isArray
- export var isArray = nativeIsArray || tagTester('Array');
+function collectNonEnumProps(obj, _keys) {
+ var nonEnumIdx = nonEnumerableProps.length;
+ var constructor = obj.constructor;
+ var proto = isFunction(constructor) && constructor.prototype || ObjProto;
- // Is a given variable an object?
- export function isObject(obj) {
- var type = typeof obj;
- return type === 'function' || type === 'object' && !!obj;
- }
+ // Constructor is a special case.
+ var prop = 'constructor';
+ if (_has(obj, prop) && !contains(_keys, prop)) _keys.push(prop);
- // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError, isMap, isWeakMap, isSet, isWeakSet.
- export var isArguments = tagTester('Arguments');
- export var isFunction = tagTester('Function');
- export var isString = tagTester('String');
- export var isNumber = tagTester('Number');
- export var isDate = tagTester('Date');
- export var isRegExp = tagTester('RegExp');
- export var isError = tagTester('Error');
- export var isSymbol = tagTester('Symbol');
- export var isMap = tagTester('Map');
- export var isWeakMap = tagTester('WeakMap');
- export var isSet = tagTester('Set');
- export var isWeakSet = tagTester('WeakSet');
-
- // Define a fallback version of the method in browsers (ahem, IE < 9), where
- // there isn't any inspectable "Arguments" type.
- (function() {
- if (!isArguments(arguments)) {
- isArguments = function(obj) {
- return _has(obj, 'callee');
- };
+ while (nonEnumIdx--) {
+ prop = nonEnumerableProps[nonEnumIdx];
+ if (prop in obj && obj[prop] !== proto[prop] && !contains(_keys, prop)) {
+ _keys.push(prop);
}
- }());
-
- // Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8,
- // IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).
- var nodelist = root.document && root.document.childNodes;
- if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {
- isFunction = function(obj) {
- return typeof obj == 'function' || false;
- };
- }
-
- // Is a given object a finite number?
- export function isFinite(obj) {
- return !isSymbol(obj) && _isFinite(obj) && !_isNaN(parseFloat(obj));
- }
-
- // Is the given value `NaN`?
- export function isNaN(obj) {
- return isNumber(obj) && _isNaN(obj);
}
-
- // Is a given value a boolean?
- export function isBoolean(obj) {
- return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
- }
-
- // Is a given value equal to null?
- export function isNull(obj) {
- return obj === null;
- }
-
- // Is a given variable undefined?
- export function isUndefined(obj) {
- return obj === void 0;
- }
-
- // Shortcut function for checking if an object has a given property directly
- // on itself (in other words, not on a prototype).
- export function has(obj, path) {
- if (!isArray(path)) {
- return _has(obj, path);
- }
- var length = path.length;
- for (var i = 0; i < length; i++) {
- var key = path[i];
- if (obj == null || !hasOwnProperty.call(obj, key)) {
- return false;
+}
+
+// Retrieve the names of an object's own properties.
+// Delegates to **ECMAScript 5**'s native `Object.keys`.
+export 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);
+ // Ahem, IE < 9.
+ if (hasEnumBug) collectNonEnumProps(obj, _keys);
+ return _keys;
+}
+
+// Retrieve all the property names of an object.
+export function allKeys(obj) {
+ if (!isObject(obj)) return [];
+ var _keys = [];
+ for (var key in obj) _keys.push(key);
+ // Ahem, IE < 9.
+ if (hasEnumBug) collectNonEnumProps(obj, _keys);
+ return _keys;
+}
+
+// Retrieve the values of an object's properties.
+export 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]];
+ }
+ return values;
+}
+
+// Returns the results of applying the iteratee to each element of the object.
+// In contrast to map it returns an object.
+export 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);
+ }
+ return results;
+}
+
+// Convert an object into a list of `[key, value]` pairs.
+// The opposite of object.
+export 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]]];
+ }
+ return pairs;
+}
+
+// Invert the keys and values of an object. The values must be serializable.
+export function invert(obj) {
+ var result = {};
+ var _keys = keys(obj);
+ for (var i = 0, length = _keys.length; i < length; i++) {
+ result[obj[_keys[i]]] = _keys[i];
+ }
+ return result;
+}
+
+// Return a sorted list of the function names available on the object.
+export { functions as methods };
+export function functions(obj) {
+ var names = [];
+ for (var key in obj) {
+ if (isFunction(obj[key])) names.push(key);
+ }
+ return names.sort();
+}
+
+// An internal function for creating assigner functions.
+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;
+ for (var i = 0; i < l; i++) {
+ var key = _keys[i];
+ if (!defaults || obj[key] === void 0) obj[key] = source[key];
}
- obj = obj[key];
}
- return !!length;
- }
-
- // Utility Functions
- // -----------------
-
- // Keep the identity function around for default iteratees.
- export function identity(value) {
- return value;
- }
-
- // Predicate-generating functions. Often useful outside of Underscore.
- export function constant(value) {
- return function() {
- return value;
+ return obj;
+ };
+}
+
+// Extend a given object with all the properties in passed-in object(s).
+export var extend = createAssigner(allKeys);
+
+// Assigns a given object with all the own properties in the passed-in object(s).
+// (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
+export var extendOwn = createAssigner(keys);
+export { extendOwn as assign };
+
+// Returns the first key on an object that passes a predicate test.
+export 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;
+ }
+}
+
+// Internal pick helper function to determine if `obj` has key `key`.
+function keyInObj(value, key, obj) {
+ return key in obj;
+}
+
+// Return a copy of the object only containing the whitelisted properties.
+export var pick = 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);
+ } else {
+ iteratee = keyInObj;
+ _keys = _flatten(_keys, false, false);
+ obj = Object(obj);
+ }
+ 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;
+ }
+ return result;
+});
+
+// Return a copy of the object without the blacklisted properties.
+export var omit = restArguments(function(obj, _keys) {
+ var iteratee = _keys[0], context;
+ 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);
};
}
-
- export function noop(){}
-
- // Creates a function that, when passed an object, will traverse that object’s
- // properties down the given `path`, specified as an array of keys or indexes.
- export function property(path) {
- if (!isArray(path)) {
- return shallowProperty(path);
+ return pick(obj, iteratee, context);
+});
+
+// Fill in a given object with default properties.
+export var defaults = createAssigner(allKeys, true);
+
+// Creates an object that inherits from the given prototype object.
+// If additional properties are provided then they will be added to the
+// created object.
+export function create(prototype, props) {
+ var result = baseCreate(prototype);
+ if (props) extendOwn(result, props);
+ return result;
+}
+
+// Create a (shallow-cloned) duplicate of an object.
+export function clone(obj) {
+ if (!isObject(obj)) return obj;
+ return isArray(obj) ? obj.slice() : extend({}, obj);
+}
+
+// Invokes interceptor with the obj, and then returns obj.
+// The primary purpose of this method is to "tap into" a method chain, in
+// order to perform operations on intermediate results within the chain.
+export function tap(obj, interceptor) {
+ interceptor(obj);
+ return obj;
+}
+
+// Returns whether an object has a given set of `key:value` pairs.
+export function isMatch(object, attrs) {
+ var _keys = keys(attrs), length = _keys.length;
+ if (object == null) return !length;
+ 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;
+ }
+ return true;
+}
+
+
+// Internal recursive comparison function for `isEqual`.
+function eq(a, b, aStack, bStack) {
+ // Identical objects are equal. `0 === -0`, but they aren't identical.
+ // See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal).
+ if (a === b) return a !== 0 || 1 / a === 1 / b;
+ // `null` or `undefined` only equal to itself (strict comparison).
+ if (a == null || b == null) return false;
+ // `NaN`s are equivalent, but non-reflexive.
+ if (a !== a) return b !== b;
+ // Exhaust primitive checks
+ var type = typeof a;
+ if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;
+ return deepEq(a, b, aStack, bStack);
+}
+
+// Internal recursive comparison function for `isEqual`.
+function deepEq(a, b, aStack, bStack) {
+ // Unwrap any wrapped objects.
+ if (a instanceof _) a = a._wrapped;
+ if (b instanceof _) b = b._wrapped;
+ // Compare `[[Class]]` names.
+ var className = toString.call(a);
+ if (className !== toString.call(b)) return false;
+ switch (className) {
+ // Strings, numbers, regular expressions, dates, and booleans are compared by value.
+ case '[object RegExp]':
+ // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')
+ case '[object String]':
+ // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
+ // equivalent to `new String("5")`.
+ return '' + a === '' + b;
+ case '[object Number]':
+ // `NaN`s are equivalent, but non-reflexive.
+ // Object(NaN) is equivalent to NaN.
+ if (+a !== +a) return +b !== +b;
+ // An `egal` comparison is performed for other numeric values.
+ return +a === 0 ? 1 / +a === 1 / b : +a === +b;
+ case '[object Date]':
+ case '[object Boolean]':
+ // Coerce dates and booleans to numeric primitive values. Dates are compared by their
+ // millisecond representations. Note that invalid dates with millisecond representations
+ // of `NaN` are not equivalent.
+ return +a === +b;
+ case '[object Symbol]':
+ return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);
+ }
+
+ var areArrays = className === '[object Array]';
+ if (!areArrays) {
+ if (typeof a != 'object' || typeof b != 'object') return false;
+
+ // Objects with different constructors are not equivalent, but `Object`s or `Array`s
+ // from different frames are.
+ 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;
}
- return function(obj) {
- return deepGet(obj, path);
- };
}
-
- // Generates a function for a given object that returns a given property.
- export function propertyOf(obj) {
- if (obj == null) {
- return function(){};
+ // Assume equality for cyclic structures. The algorithm for detecting cyclic
+ // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
+
+ // Initializing stack of traversed objects.
+ // It's done here since we only need them for objects and arrays comparison.
+ aStack = aStack || [];
+ bStack = bStack || [];
+ var length = aStack.length;
+ while (length--) {
+ // Linear search. Performance is inversely proportional to the number of
+ // unique nested structures.
+ if (aStack[length] === a) return bStack[length] === b;
+ }
+
+ // Add the first object to the stack of traversed objects.
+ aStack.push(a);
+ bStack.push(b);
+
+ // Recursively compare objects and arrays.
+ if (areArrays) {
+ // Compare array lengths to determine if a deep comparison is necessary.
+ length = a.length;
+ if (length !== b.length) return false;
+ // Deep compare the contents, ignoring non-numeric properties.
+ while (length--) {
+ if (!eq(a[length], b[length], aStack, bStack)) return false;
+ }
+ } else {
+ // Deep compare objects.
+ var _keys = keys(a), key;
+ length = _keys.length;
+ // Ensure that both objects contain the same number of properties before comparing deep equality.
+ if (keys(b).length !== length) return false;
+ while (length--) {
+ // Deep compare each member
+ key = _keys[length];
+ if (!(_has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
}
- return function(path) {
- return !isArray(path) ? obj[path] : deepGet(obj, path);
- };
}
-
- // Returns a predicate for checking whether an object has a given set of
- // `key:value` pairs.
- export { matcher as matches };
- export function matcher(attrs) {
- attrs = extendOwn({}, attrs);
- return function(obj) {
- return isMatch(obj, attrs);
+ // Remove the first object from the stack of traversed objects.
+ aStack.pop();
+ bStack.pop();
+ return true;
+}
+
+// Perform a deep comparison to check if two objects are equal.
+export function isEqual(a, b) {
+ return eq(a, b);
+}
+
+// Is a given array, string, or object empty?
+// An "empty" object has no enumerable own-properties.
+export function isEmpty(obj) {
+ if (obj == null) return true;
+ if (isArrayLike(obj) && (isArray(obj) || isString(obj) || isArguments(obj))) return obj.length === 0;
+ return keys(obj).length === 0;
+}
+
+// Is a given value a DOM element?
+export function isElement(obj) {
+ return !!(obj && obj.nodeType === 1);
+}
+
+// Internal function for creating a toString-based type tester.
+function tagTester(name) {
+ return function(obj) {
+ return toString.call(obj) === '[object ' + name + ']';
+ };
+}
+
+// Is a given value an array?
+// Delegates to ECMA5's native Array.isArray
+export var isArray = nativeIsArray || tagTester('Array');
+
+// Is a given variable an object?
+export function isObject(obj) {
+ var type = typeof obj;
+ return type === 'function' || type === 'object' && !!obj;
+}
+
+// Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError, isMap, isWeakMap, isSet, isWeakSet.
+export var isArguments = tagTester('Arguments');
+export var isFunction = tagTester('Function');
+export var isString = tagTester('String');
+export var isNumber = tagTester('Number');
+export var isDate = tagTester('Date');
+export var isRegExp = tagTester('RegExp');
+export var isError = tagTester('Error');
+export var isSymbol = tagTester('Symbol');
+export var isMap = tagTester('Map');
+export var isWeakMap = tagTester('WeakMap');
+export var isSet = tagTester('Set');
+export var isWeakSet = tagTester('WeakSet');
+
+// Define a fallback version of the method in browsers (ahem, IE < 9), where
+// there isn't any inspectable "Arguments" type.
+(function() {
+ if (!isArguments(arguments)) {
+ isArguments = function(obj) {
+ return _has(obj, 'callee');
};
}
+}());
- // Run a function **n** times.
- export 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;
- }
-
- // Return a random integer between min and max (inclusive).
- export function random(min, max) {
- if (max == null) {
- max = min;
- min = 0;
+// Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8,
+// IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).
+var nodelist = root.document && root.document.childNodes;
+if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {
+ isFunction = function(obj) {
+ return typeof obj == 'function' || false;
+ };
+}
+
+// Is a given object a finite number?
+export function isFinite(obj) {
+ return !isSymbol(obj) && _isFinite(obj) && !_isNaN(parseFloat(obj));
+}
+
+// Is the given value `NaN`?
+export function isNaN(obj) {
+ return isNumber(obj) && _isNaN(obj);
+}
+
+// Is a given value a boolean?
+export function isBoolean(obj) {
+ return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
+}
+
+// Is a given value equal to null?
+export function isNull(obj) {
+ return obj === null;
+}
+
+// Is a given variable undefined?
+export function isUndefined(obj) {
+ return obj === void 0;
+}
+
+// Shortcut function for checking if an object has a given property directly
+// on itself (in other words, not on a prototype).
+export function has(obj, path) {
+ if (!isArray(path)) {
+ return _has(obj, path);
+ }
+ var length = path.length;
+ for (var i = 0; i < length; i++) {
+ var key = path[i];
+ if (obj == null || !hasOwnProperty.call(obj, key)) {
+ return false;
}
- return min + Math.floor(Math.random() * (max - min + 1));
+ obj = obj[key];
}
+ return !!length;
+}
- // A (possibly faster) way to get the current timestamp as an integer.
- export var now = Date.now || function() {
- return new Date().getTime();
- };
+// Utility Functions
+// -----------------
+
+// Keep the identity function around for default iteratees.
+export function identity(value) {
+ return value;
+}
- // List of HTML entities for escaping.
- var escapeMap = {
- '&': '&',
- '<': '<',
- '>': '>',
- '"': '"',
- "'": ''',
- '`': '`'
+// Predicate-generating functions. Often useful outside of Underscore.
+export function constant(value) {
+ return function() {
+ return value;
};
- var unescapeMap = invert(escapeMap);
+}
- // Functions for escaping and unescaping strings to/from HTML interpolation.
- function createEscaper(map) {
- var escaper = function(match) {
- return map[match];
- };
- // Regexes for identifying a key that needs to be escaped.
- 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;
- };
- }
- export var escape = createEscaper(escapeMap);
- export var unescape = createEscaper(unescapeMap);
-
- // Traverses the children of `obj` along `path`. If a child is a function, it
- // is invoked with its parent as context. Returns the value of the final
- // child, or `fallback` if any child is undefined.
- export function result(obj, path, fallback) {
- if (!isArray(path)) path = [path];
- var length = path.length;
- if (!length) {
- 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.
- }
- obj = isFunction(prop) ? prop.call(obj) : prop;
- }
- return obj;
- }
+export function noop(){}
- // Generate a unique integer id (unique within the entire client session).
- // Useful for temporary DOM ids.
- var idCounter = 0;
- export function uniqueId(prefix) {
- var id = ++idCounter + '';
- return prefix ? prefix + id : id;
+// Creates a function that, when passed an object, will traverse that object’s
+// properties down the given `path`, specified as an array of keys or indexes.
+export function property(path) {
+ if (!isArray(path)) {
+ return shallowProperty(path);
}
-
- // By default, Underscore uses ERB-style template delimiters, change the
- // following template settings to use alternative delimiters.
- export var templateSettings = _.templateSettings = {
- evaluate: /<%([\s\S]+?)%>/g,
- interpolate: /<%=([\s\S]+?)%>/g,
- escape: /<%-([\s\S]+?)%>/g
+ return function(obj) {
+ return deepGet(obj, path);
};
+}
- // When customizing `templateSettings`, if you don't want to define an
- // interpolation, evaluation or escaping regex, we need one that is
- // guaranteed not to match.
- var noMatch = /(.)^/;
-
- // Certain characters need to be escaped so that they can be put into a
- // string literal.
- var escapes = {
- "'": "'",
- '\\': '\\',
- '\r': 'r',
- '\n': 'n',
- '\u2028': 'u2028',
- '\u2029': 'u2029'
+// Generates a function for a given object that returns a given property.
+export function propertyOf(obj) {
+ if (obj == null) {
+ return function(){};
+ }
+ return function(path) {
+ return !isArray(path) ? obj[path] : deepGet(obj, path);
};
-
- var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g;
-
- var escapeChar = function(match) {
- return '\\' + escapes[match];
+}
+
+// Returns a predicate for checking whether an object has a given set of
+// `key:value` pairs.
+export { matcher as matches };
+export function matcher(attrs) {
+ attrs = extendOwn({}, attrs);
+ return function(obj) {
+ return isMatch(obj, attrs);
};
-
- // JavaScript micro-templating, similar to John Resig's implementation.
- // Underscore templating handles arbitrary delimiters, preserves whitespace,
- // and correctly escapes quotes within interpolated code.
- // NB: `oldSettings` only exists for backwards compatibility.
- export function template(text, settings, oldSettings) {
- if (!settings && oldSettings) settings = oldSettings;
- settings = defaults({}, settings, _.templateSettings);
-
- // Combine delimiters into one regular expression via alternation.
- var matcher = RegExp([
- (settings.escape || noMatch).source,
- (settings.interpolate || noMatch).source,
- (settings.evaluate || noMatch).source
- ].join('|') + '|$', 'g');
-
- // Compile the template source, escaping string literals appropriately.
- 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;
-
- if (escape) {
- source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
- } else if (interpolate) {
- source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
- } else if (evaluate) {
- source += "';\n" + evaluate + "\n__p+='";
- }
-
- // Adobe VMs need the match returned to produce the correct offset.
- return match;
- });
- source += "';\n";
-
- // If a variable is not specified, place data values in local scope.
- if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\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(settings.variable || 'obj', '_', source);
- } catch (e) {
- e.source = source;
- throw e;
+}
+
+// Run a function **n** times.
+export 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;
+}
+
+// Return a random integer between min and max (inclusive).
+export function random(min, max) {
+ if (max == null) {
+ max = min;
+ min = 0;
+ }
+ return min + Math.floor(Math.random() * (max - min + 1));
+}
+
+// A (possibly faster) way to get the current timestamp as an integer.
+export var now = Date.now || function() {
+ return new Date().getTime();
+};
+
+// List of HTML entities for escaping.
+var escapeMap = {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ "'": ''',
+ '`': '`'
+};
+var unescapeMap = invert(escapeMap);
+
+// Functions for escaping and unescaping strings to/from HTML interpolation.
+function createEscaper(map) {
+ var escaper = function(match) {
+ return map[match];
+ };
+ // Regexes for identifying a key that needs to be escaped.
+ 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;
+ };
+}
+export var escape = createEscaper(escapeMap);
+export var unescape = createEscaper(unescapeMap);
+
+// Traverses the children of `obj` along `path`. If a child is a function, it
+// is invoked with its parent as context. Returns the value of the final
+// child, or `fallback` if any child is undefined.
+export function result(obj, path, fallback) {
+ if (!isArray(path)) path = [path];
+ var length = path.length;
+ if (!length) {
+ 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.
+ }
+ obj = isFunction(prop) ? prop.call(obj) : prop;
+ }
+ return obj;
+}
+
+// Generate a unique integer id (unique within the entire client session).
+// Useful for temporary DOM ids.
+var idCounter = 0;
+export function uniqueId(prefix) {
+ var id = ++idCounter + '';
+ return prefix ? prefix + id : id;
+}
+
+// By default, Underscore uses ERB-style template delimiters, change the
+// following template settings to use alternative delimiters.
+export var templateSettings = _.templateSettings = {
+ evaluate: /<%([\s\S]+?)%>/g,
+ interpolate: /<%=([\s\S]+?)%>/g,
+ escape: /<%-([\s\S]+?)%>/g
+};
+
+// When customizing `templateSettings`, if you don't want to define an
+// interpolation, evaluation or escaping regex, we need one that is
+// guaranteed not to match.
+var noMatch = /(.)^/;
+
+// Certain characters need to be escaped so that they can be put into a
+// string literal.
+var escapes = {
+ "'": "'",
+ '\\': '\\',
+ '\r': 'r',
+ '\n': 'n',
+ '\u2028': 'u2028',
+ '\u2029': 'u2029'
+};
+
+var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g;
+
+var escapeChar = function(match) {
+ return '\\' + escapes[match];
+};
+
+// JavaScript micro-templating, similar to John Resig's implementation.
+// Underscore templating handles arbitrary delimiters, preserves whitespace,
+// and correctly escapes quotes within interpolated code.
+// NB: `oldSettings` only exists for backwards compatibility.
+export function template(text, settings, oldSettings) {
+ if (!settings && oldSettings) settings = oldSettings;
+ settings = defaults({}, settings, _.templateSettings);
+
+ // Combine delimiters into one regular expression via alternation.
+ var matcher = RegExp([
+ (settings.escape || noMatch).source,
+ (settings.interpolate || noMatch).source,
+ (settings.evaluate || noMatch).source
+ ].join('|') + '|$', 'g');
+
+ // Compile the template source, escaping string literals appropriately.
+ 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;
+
+ if (escape) {
+ source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
+ } else if (interpolate) {
+ source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
+ } else if (evaluate) {
+ source += "';\n" + evaluate + "\n__p+='";
}
- var template = function(data) {
- return render.call(this, data, _);
- };
-
- // Provide the compiled source as a convenience for precompilation.
- var argument = settings.variable || 'obj';
- template.source = 'function(' + argument + '){\n' + source + '}';
-
- return template;
- }
-
- // Add a "chain" function. Start chaining a wrapped Underscore object.
- export function chain(obj) {
- var instance = _(obj);
- instance._chain = true;
- return instance;
- }
+ // Adobe VMs need the match returned to produce the correct offset.
+ return match;
+ });
+ source += "';\n";
- // OOP
- // ---------------
- // If Underscore is called as a function, it returns a wrapped object that
- // can be used OO-style. This wrapper holds altered versions of all the
- // underscore functions. Wrapped objects may be chained.
+ // If a variable is not specified, place data values in local scope.
+ if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
- // Helper function to continue chaining intermediate results.
- function chainResult(instance, obj) {
- return instance._chain ? _(obj).chain() : obj;
- }
+ source = "var __t,__p='',__j=Array.prototype.join," +
+ "print=function(){__p+=__j.call(arguments,'');};\n" +
+ source + 'return __p;\n';
- // Add your own custom functions to the Underscore object.
- export 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));
- };
- });
- return _;
+ var render;
+ try {
+ render = new Function(settings.variable || 'obj', '_', source);
+ } catch (e) {
+ e.source = source;
+ throw e;
}
- // Add all mutator Array functions to the wrapper.
- each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
- var method = ArrayProto[name];
- _.prototype[name] = function() {
- var obj = this._wrapped;
- method.apply(obj, arguments);
- if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0];
- return chainResult(this, obj);
- };
- });
+ var template = function(data) {
+ return render.call(this, data, _);
+ };
- // Add all accessor Array functions to the wrapper.
- each(['concat', 'join', 'slice'], function(name) {
- var method = ArrayProto[name];
+ // Provide the compiled source as a convenience for precompilation.
+ var argument = settings.variable || 'obj';
+ template.source = 'function(' + argument + '){\n' + source + '}';
+
+ return template;
+}
+
+// Add a "chain" function. Start chaining a wrapped Underscore object.
+export function chain(obj) {
+ var instance = _(obj);
+ instance._chain = true;
+ return instance;
+}
+
+// OOP
+// ---------------
+// If Underscore is called as a function, it returns a wrapped object that
+// can be used OO-style. This wrapper holds altered versions of all the
+// underscore functions. Wrapped objects may be chained.
+
+// Helper function to continue chaining intermediate results.
+function chainResult(instance, obj) {
+ return instance._chain ? _(obj).chain() : obj;
+}
+
+// Add your own custom functions to the Underscore object.
+export function mixin(obj) {
+ each(functions(obj), function(name) {
+ var func = _[name] = obj[name];
_.prototype[name] = function() {
- return chainResult(this, method.apply(this._wrapped, arguments));
+ var args = [this._wrapped];
+ push.apply(args, arguments);
+ return chainResult(this, func.apply(_, args));
};
});
+ return _;
+}
+
+// Add all mutator Array functions to the wrapper.
+each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
+ var method = ArrayProto[name];
+ _.prototype[name] = function() {
+ var obj = this._wrapped;
+ method.apply(obj, arguments);
+ if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0];
+ return chainResult(this, obj);
+ };
+});
- // Extracts the result from a wrapped and chained object.
- _.prototype.value = function() {
- return this._wrapped;
+// Add all accessor Array functions to the wrapper.
+each(['concat', 'join', 'slice'], function(name) {
+ var method = ArrayProto[name];
+ _.prototype[name] = function() {
+ return chainResult(this, method.apply(this._wrapped, arguments));
};
+});
- // Provide unwrapping proxy for some methods used in engine operations
- // such as arithmetic and JSON stringification.
- _.prototype.valueOf = _.prototype.toJSON = _.prototype.value;
+// Extracts the result from a wrapped and chained object.
+_.prototype.value = function() {
+ return this._wrapped;
+};
- _.prototype.toString = function() {
- return String(this._wrapped);
- };
+// Provide unwrapping proxy for some methods used in engine operations
+// such as arithmetic and JSON stringification.
+_.prototype.valueOf = _.prototype.toJSON = _.prototype.value;
+
+_.prototype.toString = function() {
+ return String(this._wrapped);
+};
From 15513d68502e124041fa5950afe8e2159bbf81a8 Mon Sep 17 00:00:00 2001
From: Julian Gonggrijp
Date: Fri, 13 Mar 2020 15:09:37 +0100
Subject: [PATCH 030/253] Reorganize the modules
---
modules/index-all.js | 2 ++
modules/index-default.js | 5 +++++
underscore-source.js => modules/index.js | 2 +-
package.json | 2 +-
rollup.config.js | 2 +-
test-treeshake/map.js | 2 +-
test-treeshake/template.js | 2 +-
underscore-module.js | 8 --------
underscore-umd.js | 1 -
9 files changed, 12 insertions(+), 14 deletions(-)
create mode 100644 modules/index-all.js
create mode 100644 modules/index-default.js
rename underscore-source.js => modules/index.js (99%)
delete mode 100644 underscore-module.js
delete mode 100644 underscore-umd.js
diff --git a/modules/index-all.js b/modules/index-all.js
new file mode 100644
index 000000000..c37358a50
--- /dev/null
+++ b/modules/index-all.js
@@ -0,0 +1,2 @@
+export { default } from './index-default';
+export * from './index';
diff --git a/modules/index-default.js b/modules/index-default.js
new file mode 100644
index 000000000..bf6cd1e71
--- /dev/null
+++ b/modules/index-default.js
@@ -0,0 +1,5 @@
+import * as allExports from './index';
+import { mixin } from './index';
+
+// Add all of the Underscore functions to the wrapper object and return it.
+export default mixin(allExports);
diff --git a/underscore-source.js b/modules/index.js
similarity index 99%
rename from underscore-source.js
rename to modules/index.js
index 98d69a4fa..f49f700fa 100644
--- a/underscore-source.js
+++ b/modules/index.js
@@ -38,7 +38,7 @@ var _isNaN = root.isNaN,
var Ctor = function(){};
// The Underscore object. All exported functions below are added to it in the
-// underscore-module.js using the mixin function.
+// modules/index-all.js using the mixin function.
export default function _(obj) {
if (obj instanceof _) return obj;
if (!(this instanceof _)) return new _(obj);
diff --git a/package.json b/package.json
index 1a3a5a6ee..3d24e77e8 100644
--- a/package.json
+++ b/package.json
@@ -37,7 +37,7 @@
"test": "npm run lint && npm run test-node",
"coverage": "nyc npm run test-node && nyc report",
"coveralls": "nyc npm run test-node && nyc report --reporter=text-lcov | coveralls",
- "lint": "eslint underscore-{source,module,umd}.js test/*.js",
+ "lint": "eslint modules/*.js test/*.js",
"test-node": "npm run prepare-tests && qunit-cli test/*.js",
"test-browser": "npm run prepare-tests && npm i karma-phantomjs-launcher && karma start",
"bundle": "rollup --config",
diff --git a/rollup.config.js b/rollup.config.js
index 3f26368b5..9f2e427ff 100644
--- a/rollup.config.js
+++ b/rollup.config.js
@@ -1,5 +1,5 @@
module.exports = {
- input: 'underscore-umd.js',
+ input: 'modules/index-default.js',
treeshake: false,
context: 'this',
output: {
diff --git a/test-treeshake/map.js b/test-treeshake/map.js
index 59f3847b8..1b3713916 100644
--- a/test-treeshake/map.js
+++ b/test-treeshake/map.js
@@ -1 +1 @@
-export { map } from '../underscore-source';
+export { map } from '../modules/index';
diff --git a/test-treeshake/template.js b/test-treeshake/template.js
index 30a970b35..850e5a204 100644
--- a/test-treeshake/template.js
+++ b/test-treeshake/template.js
@@ -1 +1 @@
-export { template } from '../underscore-module';
+export { template } from '../modules/index-all';
diff --git a/underscore-module.js b/underscore-module.js
deleted file mode 100644
index 79c92df97..000000000
--- a/underscore-module.js
+++ /dev/null
@@ -1,8 +0,0 @@
-import * as allExports from './underscore-source';
-import { mixin } from './underscore-source';
-
-// Add all of the Underscore functions to the wrapper object and return it.
-export default mixin(allExports);
-
-// Export the separate functions and constants as well.
-export * from './underscore-source';
diff --git a/underscore-umd.js b/underscore-umd.js
deleted file mode 100644
index e3a7725fc..000000000
--- a/underscore-umd.js
+++ /dev/null
@@ -1 +0,0 @@
-export { default } from './underscore-module';
From 8f4bbc64fe25ff8386d985488376109772e8f044 Mon Sep 17 00:00:00 2001
From: Julian Gonggrijp
Date: Fri, 13 Mar 2020 15:17:24 +0100
Subject: [PATCH 031/253] Move all the export aliases below the thing they
alias
This is necessary in order to preserve all the comments.
---
modules/index.js | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/modules/index.js b/modules/index.js
index f49f700fa..a190a8e67 100644
--- a/modules/index.js
+++ b/modules/index.js
@@ -169,7 +169,6 @@ function isArrayLike(collection) {
// The cornerstone, an `each` implementation, aka `forEach`.
// Handles raw objects in addition to array-likes. Treats all
// sparse array-likes as if they were dense.
-export { each as forEach };
export function each(obj, iteratee, context) {
iteratee = optimizeCb(iteratee, context);
var i, length;
@@ -185,9 +184,9 @@ export function each(obj, iteratee, context) {
}
return obj;
}
+export { each as forEach };
// Return the results of applying the iteratee to each element.
-export { map as collect };
export function map(obj, iteratee, context) {
iteratee = cb(iteratee, context);
var _keys = !isArrayLike(obj) && keys(obj),
@@ -199,6 +198,7 @@ export function map(obj, iteratee, context) {
}
return results;
}
+export { map as collect };
// Create a reducing function iterating left or right.
function createReduce(dir) {
@@ -235,15 +235,14 @@ export var reduceRight = createReduce(-1);
export { reduceRight as foldr };
// Return the first value which passes a truth test.
-export { find as detect };
export 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 { find as detect };
// Return all the elements that pass a truth test.
-export { filter as select };
export function filter(obj, predicate, context) {
var results = [];
predicate = cb(predicate, context);
@@ -252,6 +251,7 @@ export function filter(obj, predicate, context) {
});
return results;
}
+export { filter as select };
// Return all the elements for which a truth test fails.
export function reject(obj, predicate, context) {
@@ -259,7 +259,6 @@ export function reject(obj, predicate, context) {
}
// Determine whether all of the elements match a truth test.
-export { every as all };
export function every(obj, predicate, context) {
predicate = cb(predicate, context);
var _keys = !isArrayLike(obj) && keys(obj),
@@ -270,9 +269,9 @@ export function every(obj, predicate, context) {
}
return true;
}
+export { every as all };
// Determine if at least one element in the object matches a truth test.
-export { some as any };
export function some(obj, predicate, context) {
predicate = cb(predicate, context);
var _keys = !isArrayLike(obj) && keys(obj),
@@ -283,14 +282,15 @@ export function some(obj, predicate, context) {
}
return false;
}
+export { some as any };
// Determine if the array or object contains a given item (using `===`).
-export { contains as includes, contains as include };
export 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 { contains as includes, contains as include };
// Invoke a method (with arguments) on every item in a collection.
export var invoke = restArguments(function(obj, path, args) {
@@ -491,12 +491,12 @@ export var partition = group(function(result, value, pass) {
// Get the first element of an array. Passing **n** will return the first N
// values in the array. The **guard** check allows it to work with `map`.
-export { first as head, first as take };
export function first(array, n, guard) {
if (array == null || array.length < 1) return n == null ? void 0 : [];
if (n == null || guard) return array[0];
return initial(array, array.length - n);
}
+export { first as head, first as take };
// Returns everything but the last entry of the array. Especially useful on
// the arguments object. Passing **n** will return all the values in
@@ -516,10 +516,10 @@ export function last(array, n, guard) {
// Returns everything but the first entry of the array. Especially useful on
// the arguments object. Passing an **n** will return the rest N values in the
// array.
-export { rest as tail, rest as drop };
export function rest(array, n, guard) {
return slice.call(array, n == null || guard ? 1 : n);
}
+export { rest as tail, rest as drop };
// Trim out all falsy values from an array.
export function compact(array) {
@@ -563,7 +563,6 @@ export var without = restArguments(function(array, otherArrays) {
// The faster algorithm will not work with an iteratee if the iteratee
// is not a one-to-one function, so providing an iteratee will disable
// the faster algorithm.
-export { uniq as unique };
export function uniq(array, isSorted, iteratee, context) {
if (!isBoolean(isSorted)) {
context = iteratee;
@@ -590,6 +589,7 @@ export function uniq(array, isSorted, iteratee, context) {
}
return result;
}
+export { uniq as unique };
// Produce an array that contains the union: each distinct element from all of
// the passed-in arrays.
@@ -1057,7 +1057,6 @@ export function invert(obj) {
}
// Return a sorted list of the function names available on the object.
-export { functions as methods };
export function functions(obj) {
var names = [];
for (var key in obj) {
@@ -1065,6 +1064,7 @@ export function functions(obj) {
}
return names.sort();
}
+export { functions as methods };
// An internal function for creating assigner functions.
function createAssigner(keysFunc, defaults) {
@@ -1437,13 +1437,13 @@ export function propertyOf(obj) {
// Returns a predicate for checking whether an object has a given set of
// `key:value` pairs.
-export { matcher as matches };
export function matcher(attrs) {
attrs = extendOwn({}, attrs);
return function(obj) {
return isMatch(obj, attrs);
};
}
+export { matcher as matches };
// Run a function **n** times.
export function times(n, iteratee, context) {
From ab9235d35b2c71cfc09e35ed5205182b08cae5ff Mon Sep 17 00:00:00 2001
From: Julian Gonggrijp
Date: Fri, 13 Mar 2020 15:38:27 +0100
Subject: [PATCH 032/253] Generate a separate ESM bundle for docco
---
.gitignore | 1 +
docs/rollup.config.js | 14 ++++++++++++++
package.json | 2 +-
3 files changed, 16 insertions(+), 1 deletion(-)
create mode 100644 docs/rollup.config.js
diff --git a/.gitignore b/.gitignore
index 40ef2de14..250659f2f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@ node_modules
nyc_output
coverage
test-treeshake/*-umd.js
+docs/underscore.js
diff --git a/docs/rollup.config.js b/docs/rollup.config.js
new file mode 100644
index 000000000..62384078d
--- /dev/null
+++ b/docs/rollup.config.js
@@ -0,0 +1,14 @@
+module.exports = {
+ input: '../modules/index-all.js',
+ treeshake: false,
+ context: 'this',
+ output: {
+ file: 'underscore.js',
+ exports: 'named',
+ format: 'esm',
+ legacy: true,
+ strict: false,
+ externalLiveBindings: false,
+ freeze: false,
+ },
+};
diff --git a/package.json b/package.json
index 3d24e77e8..38082ed74 100644
--- a/package.json
+++ b/package.json
@@ -45,7 +45,7 @@
"prepare-tests": "npm run bundle && npm run bundle-treeshake",
"minify": "uglifyjs underscore.js -c \"evaluate=false\" --comments \"/ .*/\" -m",
"build": "npm run bundle && npm run minify -- --source-map content=underscore.js.map --source-map-url \" \" -o underscore-min.js",
- "doc": "npm run bundle && docco underscore-source.js underscore-module.js",
+ "doc": "cd docs && rollup -c && docco -o . underscore.js",
"weight": "npm run bundle && npm run minify | gzip-size | pretty-bytes"
},
"license": "MIT",
From 4fbfdd1004f86089f60df900e1e20b0a7f25a842 Mon Sep 17 00:00:00 2001
From: Julian Gonggrijp
Date: Fri, 13 Mar 2020 16:47:27 +0100
Subject: [PATCH 033/253] Fix the package.json
---
package.json | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/package.json b/package.json
index 38082ed74..37ad8be08 100644
--- a/package.json
+++ b/package.json
@@ -15,7 +15,7 @@
"url": "git://github.com/jashkenas/underscore.git"
},
"main": "underscore.js",
- "module": "underscore-module.js",
+ "module": "modules/index-all.js",
"version": "1.9.2",
"devDependencies": {
"coveralls": "^2.11.2",
@@ -52,6 +52,7 @@
"files": [
"underscore.js",
"underscore-min.js",
- "underscore-min.js.map"
+ "underscore-min.js.map",
+ "modules/"
]
}
From a3f6e76ffabc7fafadf84c1f4414405918c0fc59 Mon Sep 17 00:00:00 2001
From: Julian Gonggrijp
Date: Sat, 14 Mar 2020 02:12:06 +0100
Subject: [PATCH 034/253] Lint the UMD bundle based on ES3 syntax
---
.eslintrc | 11 ++---------
modules/.eslintrc | 12 ++++++++++++
package.json | 2 +-
3 files changed, 15 insertions(+), 10 deletions(-)
create mode 100644 modules/.eslintrc
diff --git a/.eslintrc b/.eslintrc
index 4466054f3..16c8fedc8 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -5,13 +5,6 @@
"amd": true
},
"parserOptions": {
- "ecmaVersion": 6,
- "sourceType": "module",
- },
- "plugins": [
- "import"
- ],
- "extends": [
- "plugin:import/errors"
- ]
+ "ecmaVersion": 3
+ }
}
diff --git a/modules/.eslintrc b/modules/.eslintrc
new file mode 100644
index 000000000..b0802cb0d
--- /dev/null
+++ b/modules/.eslintrc
@@ -0,0 +1,12 @@
+{
+ "parserOptions": {
+ "ecmaVersion": 6,
+ "sourceType": "module",
+ },
+ "plugins": [
+ "import"
+ ],
+ "extends": [
+ "plugin:import/errors"
+ ]
+}
diff --git a/package.json b/package.json
index 37ad8be08..52d91cb76 100644
--- a/package.json
+++ b/package.json
@@ -40,7 +40,7 @@
"lint": "eslint modules/*.js test/*.js",
"test-node": "npm run prepare-tests && qunit-cli test/*.js",
"test-browser": "npm run prepare-tests && npm i karma-phantomjs-launcher && karma start",
- "bundle": "rollup --config",
+ "bundle": "rollup --config && eslint underscore.js",
"bundle-treeshake": "cd test-treeshake && npx rollup@latest --config",
"prepare-tests": "npm run bundle && npm run bundle-treeshake",
"minify": "uglifyjs underscore.js -c \"evaluate=false\" --comments \"/ .*/\" -m",
From 200f8870f4d7033838aa78ed5db83c8eceb36523 Mon Sep 17 00:00:00 2001
From: Julian Gonggrijp
Date: Fri, 13 Mar 2020 14:01:47 +0100
Subject: [PATCH 035/253] Take this from an isolated script context
Hopefully, this fixes #2827.
---
underscore.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/underscore.js b/underscore.js
index 0fff5f28f..1a5081676 100644
--- a/underscore.js
+++ b/underscore.js
@@ -13,7 +13,7 @@
// instead of `window` for `WebWorker` support.
var root = typeof self == 'object' && self.self === self && self ||
typeof global == 'object' && global.global === global && global ||
- this ||
+ Function('return this')() ||
{};
// Save the previous value of the `_` variable.
From 96f5019d07577f7d634377fba47a97e4130a2f5f Mon Sep 17 00:00:00 2001
From: Julian Gonggrijp
Date: Sun, 29 Mar 2020 14:34:26 +0200
Subject: [PATCH 036/253] Autobuild the UMD bundle on pre-commit with Husky
---
package-lock.json | 269 +++++++
package.json | 9 +-
underscore.js | 1825 +++++++++++++++++++++++++++++++++++++++++++++
underscore.js.map | 1 +
4 files changed, 2103 insertions(+), 1 deletion(-)
create mode 100644 underscore.js
create mode 100644 underscore.js.map
diff --git a/package-lock.json b/package-lock.json
index 93430813f..79ce5ef74 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -61,6 +61,21 @@
}
}
},
+ "@babel/runtime": {
+ "version": "7.9.2",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.2.tgz",
+ "integrity": "sha512-NE2DtOdufG7R5vnfQUTehdTfNycfUANEtCa9PssN9O/xmTzP4E08UI797ixaei6hBEVL9BI/PsdJS5x7mWoB9Q==",
+ "dev": true,
+ "requires": {
+ "regenerator-runtime": "^0.13.4"
+ }
+ },
+ "@types/color-name": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
+ "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==",
+ "dev": true
+ },
"@types/estree": {
"version": "0.0.39",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz",
@@ -73,6 +88,12 @@
"integrity": "sha512-PfSBCTQhAQg6QBP4UhXgrZ/wQ3pjfwBr4sA7Aul+pC9XwGgm9ezrJF7OiC/I4Kf+7VPu/5ThKngAruqxyctZfA==",
"dev": true
},
+ "@types/parse-json": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz",
+ "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==",
+ "dev": true
+ },
"abbrev": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz",
@@ -768,6 +789,12 @@
"readdirp": "^2.0.0"
}
},
+ "ci-info": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz",
+ "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==",
+ "dev": true
+ },
"class-utils": {
"version": "0.3.6",
"resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
@@ -891,6 +918,12 @@
"integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==",
"dev": true
},
+ "compare-versions": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz",
+ "integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==",
+ "dev": true
+ },
"component-bind": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz",
@@ -975,6 +1008,39 @@
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
"dev": true
},
+ "cosmiconfig": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz",
+ "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==",
+ "dev": true,
+ "requires": {
+ "@types/parse-json": "^4.0.0",
+ "import-fresh": "^3.1.0",
+ "parse-json": "^5.0.0",
+ "path-type": "^4.0.0",
+ "yaml": "^1.7.2"
+ },
+ "dependencies": {
+ "parse-json": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz",
+ "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "^7.0.0",
+ "error-ex": "^1.3.1",
+ "json-parse-better-errors": "^1.0.1",
+ "lines-and-columns": "^1.1.6"
+ }
+ },
+ "path-type": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
+ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
+ "dev": true
+ }
+ }
+ },
"coveralls": {
"version": "2.13.3",
"resolved": "https://registry.npmjs.org/coveralls/-/coveralls-2.13.3.tgz",
@@ -2156,6 +2222,15 @@
"pinkie-promise": "^2.0.0"
}
},
+ "find-versions": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-3.2.0.tgz",
+ "integrity": "sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==",
+ "dev": true,
+ "requires": {
+ "semver-regex": "^2.0.0"
+ }
+ },
"findup-sync": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz",
@@ -3555,6 +3630,134 @@
}
}
},
+ "husky": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/husky/-/husky-4.2.3.tgz",
+ "integrity": "sha512-VxTsSTRwYveKXN4SaH1/FefRJYCtx+wx04sSVcOpD7N2zjoHxa+cEJ07Qg5NmV3HAK+IRKOyNVpi2YBIVccIfQ==",
+ "dev": true,
+ "requires": {
+ "chalk": "^3.0.0",
+ "ci-info": "^2.0.0",
+ "compare-versions": "^3.5.1",
+ "cosmiconfig": "^6.0.0",
+ "find-versions": "^3.2.0",
+ "opencollective-postinstall": "^2.0.2",
+ "pkg-dir": "^4.2.0",
+ "please-upgrade-node": "^3.2.0",
+ "slash": "^3.0.0",
+ "which-pm-runs": "^1.0.0"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
+ "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
+ "dev": true,
+ "requires": {
+ "@types/color-name": "^1.1.1",
+ "color-convert": "^2.0.1"
+ }
+ },
+ "chalk": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
+ "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ }
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "dev": true,
+ "requires": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ }
+ },
+ "has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true
+ },
+ "locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "dev": true,
+ "requires": {
+ "p-locate": "^4.1.0"
+ }
+ },
+ "p-limit": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz",
+ "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==",
+ "dev": true,
+ "requires": {
+ "p-try": "^2.0.0"
+ }
+ },
+ "p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "dev": true,
+ "requires": {
+ "p-limit": "^2.2.0"
+ }
+ },
+ "p-try": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
+ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
+ "dev": true
+ },
+ "path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+ "dev": true
+ },
+ "pkg-dir": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
+ "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
+ "dev": true,
+ "requires": {
+ "find-up": "^4.0.0"
+ }
+ },
+ "supports-color": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
+ "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^4.0.0"
+ }
+ }
+ }
+ },
"iconv-lite": {
"version": "0.4.19",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz",
@@ -4109,6 +4312,12 @@
"dev": true,
"optional": true
},
+ "json-parse-better-errors": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
+ "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==",
+ "dev": true
+ },
"json-schema": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
@@ -4295,6 +4504,12 @@
"type-check": "~0.3.1"
}
},
+ "lines-and-columns": {
+ "version": "1.1.6",
+ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz",
+ "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=",
+ "dev": true
+ },
"load-json-file": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
@@ -4907,6 +5122,12 @@
"mimic-fn": "^2.1.0"
}
},
+ "opencollective-postinstall": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz",
+ "integrity": "sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw==",
+ "dev": true
+ },
"optimist": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz",
@@ -5168,6 +5389,15 @@
}
}
},
+ "please-upgrade-node": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz",
+ "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==",
+ "dev": true,
+ "requires": {
+ "semver-compare": "^1.0.0"
+ }
+ },
"posix-character-classes": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
@@ -5423,6 +5653,12 @@
"strip-indent": "^1.0.1"
}
},
+ "regenerator-runtime": {
+ "version": "0.13.5",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz",
+ "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==",
+ "dev": true
+ },
"regex-cache": {
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz",
@@ -5682,6 +5918,18 @@
"integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==",
"dev": true
},
+ "semver-compare": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz",
+ "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=",
+ "dev": true
+ },
+ "semver-regex": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz",
+ "integrity": "sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==",
+ "dev": true
+ },
"set-immediate-shim": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz",
@@ -5738,6 +5986,12 @@
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
"dev": true
},
+ "slash": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
+ "dev": true
+ },
"slice-ansi": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz",
@@ -6951,6 +7205,12 @@
"isexe": "^2.0.0"
}
},
+ "which-pm-runs": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz",
+ "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=",
+ "dev": true
+ },
"window-size": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz",
@@ -7035,6 +7295,15 @@
"integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=",
"dev": true
},
+ "yaml": {
+ "version": "1.8.3",
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.8.3.tgz",
+ "integrity": "sha512-X/v7VDnK+sxbQ2Imq4Jt2PRUsRsP7UcpSl3Llg6+NRRqWLIvxkMFYtH1FmvwNGYRKKPa+EPA4qDBlI9WVG1UKw==",
+ "dev": true,
+ "requires": {
+ "@babel/runtime": "^7.8.7"
+ }
+ },
"yargs": {
"version": "3.10.0",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz",
diff --git a/package.json b/package.json
index 52d91cb76..af8771e1e 100644
--- a/package.json
+++ b/package.json
@@ -23,6 +23,7 @@
"eslint": "^6.8.0",
"eslint-plugin-import": "^2.20.1",
"gzip-size-cli": "^1.0.0",
+ "husky": "^4.2.3",
"karma": "^0.13.13",
"karma-qunit": "~2.0.1",
"karma-sauce-launcher": "^1.2.0",
@@ -54,5 +55,11 @@
"underscore-min.js",
"underscore-min.js.map",
"modules/"
- ]
+ ],
+ "husky": {
+ "hooks": {
+ "pre-commit": "npm run bundle && git add underscore.js underscore.js.map",
+ "post-commit": "git reset underscore.js underscore.js.map"
+ }
+ }
}
diff --git a/underscore.js b/underscore.js
new file mode 100644
index 000000000..d3395b336
--- /dev/null
+++ b/underscore.js
@@ -0,0 +1,1825 @@
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+ typeof define === 'function' && define.amd ? define('underscore', factory) :
+ (function() {
+ var current = global._;
+ var exports = factory();
+ global._ = exports;
+ exports.noConflict = function() { global._ = current; return exports; };
+ })();
+}(this, (function () {
+
+ // Underscore.js 1.9.2
+ // https://underscorejs.org
+ // (c) 2009-2018 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ // Underscore may be freely distributed under the MIT license.
+
+ // Baseline setup
+ // --------------
+
+ // Establish the root object, `window` (`self`) in the browser, `global`
+ // on the server, or `this` in some virtual machines. We use `self`
+ // instead of `window` for `WebWorker` support.
+ var root = typeof self == 'object' && self.self === self && self ||
+ typeof global == 'object' && global.global === global && global ||
+ Function('return this')() ||
+ {};
+
+ // Save bytes in the minified (but not gzipped) version:
+ var ArrayProto = Array.prototype, ObjProto = Object.prototype;
+ var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;
+
+ // Create quick reference variables for speed access to core prototypes.
+ var push = ArrayProto.push,
+ slice = ArrayProto.slice,
+ toString = ObjProto.toString,
+ hasOwnProperty = ObjProto.hasOwnProperty;
+
+ // All **ECMAScript 5** native function implementations that we hope to use
+ // are declared here.
+ var nativeIsArray = Array.isArray,
+ nativeKeys = Object.keys,
+ nativeCreate = Object.create;
+
+ // Create references to these builtin functions because we override them.
+ var _isNaN = root.isNaN,
+ _isFinite = root.isFinite;
+
+ // Naked function reference for surrogate-prototype-swapping.
+ var Ctor = function(){};
+
+ // The Underscore object. All exported functions below are added to it in the
+ // modules/index-all.js using the mixin function.
+ function _(obj) {
+ if (obj instanceof _) return obj;
+ if (!(this instanceof _)) return new _(obj);
+ this._wrapped = obj;
+ }
+
+ // Current version.
+ var VERSION = _.VERSION = '1.9.2';
+
+ // Internal function that returns an efficient (for current engines) version
+ // of the passed-in callback, to be repeatedly applied in other Underscore
+ // functions.
+ 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);
+ };
+ // The 2-argument case is omitted because we’re not using it.
+ 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);
+ };
+ }
+ return function() {
+ return func.apply(context, arguments);
+ };
+ }
+
+ // An internal function to generate callbacks that can be applied to each
+ // element in a collection, returning the desired result — either `identity`,
+ // an arbitrary callback, a property matcher, or a property accessor.
+ 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);
+ }
+
+ // External wrapper for our callback generator. Users may customize
+ // `_.iteratee` if they want additional predicate/iteratee shorthand styles.
+ // This abstraction hides the internal-only argCount argument.
+ _.iteratee = iteratee;
+ function iteratee(value, context) {
+ return baseIteratee(value, context, Infinity);
+ }
+
+ // The function we actually call internally. It invokes _.iteratee if
+ // overridden, otherwise baseIteratee.
+ function cb(value, context, argCount) {
+ if (_.iteratee !== iteratee) return _.iteratee(value, context);
+ return baseIteratee(value, context, argCount);
+ }
+
+ // Some functions take a variable number of arguments, or a few expected
+ // arguments at the beginning and then a variable number of values to operate
+ // on. This helper accumulates all remaining arguments past the function’s
+ // argument length (or an explicit `startIndex`), into an array that becomes
+ // the last argument. Similar to ES6’s "rest parameter".
+ 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];
+ }
+ 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);
+ }
+ var args = Array(startIndex + 1);
+ for (index = 0; index < startIndex; index++) {
+ args[index] = arguments[index];
+ }
+ args[startIndex] = rest;
+ return func.apply(this, args);
+ };
+ }
+
+ // An internal function for creating a new object that inherits from another.
+ function baseCreate(prototype) {
+ if (!isObject(prototype)) return {};
+ if (nativeCreate) return nativeCreate(prototype);
+ Ctor.prototype = prototype;
+ var result = new Ctor;
+ Ctor.prototype = null;
+ return result;
+ }
+
+ function shallowProperty(key) {
+ return function(obj) {
+ return obj == null ? void 0 : obj[key];
+ };
+ }
+
+ function _has(obj, path) {
+ return obj != null && hasOwnProperty.call(obj, path);
+ }
+
+ 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]];
+ }
+ return length ? obj : void 0;
+ }
+
+ // Helper for collection methods to determine whether a collection
+ // should be iterated as an array or as an object.
+ // Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength
+ // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094
+ var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;
+ var getLength = shallowProperty('length');
+ function isArrayLike(collection) {
+ var length = getLength(collection);
+ return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX;
+ }
+
+ // Collection Functions
+ // --------------------
+
+ // The cornerstone, an `each` implementation, aka `forEach`.
+ // Handles raw objects in addition to array-likes. Treats all
+ // sparse array-likes as if they were dense.
+ 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);
+ }
+ } else {
+ var _keys = keys(obj);
+ for (i = 0, length = _keys.length; i < length; i++) {
+ iteratee(obj[_keys[i]], _keys[i], obj);
+ }
+ }
+ return obj;
+ }
+
+ // Return the results of applying the iteratee to each element.
+ 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);
+ }
+ return results;
+ }
+
+ // Create a reducing function iterating left or right.
+ function createReduce(dir) {
+ // Wrap code that reassigns argument variables in a separate function than
+ // the one that accesses `arguments.length` to avoid a perf hit. (#1991)
+ 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];
+ index += dir;
+ }
+ for (; index >= 0 && index < length; index += dir) {
+ var currentKey = _keys ? _keys[index] : index;
+ 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);
+ };
+ }
+
+ // **Reduce** builds up a single result from a list of values, aka `inject`,
+ // or `foldl`.
+ var reduce = createReduce(1);
+
+ // The right-associative version of reduce, also known as `foldr`.
+ var reduceRight = createReduce(-1);
+
+ // Return the first value which passes a truth test.
+ 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];
+ }
+
+ // Return all the elements that pass a truth test.
+ 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);
+ });
+ return results;
+ }
+
+ // Return all the elements for which a truth test fails.
+ function reject(obj, predicate, context) {
+ return filter(obj, negate(cb(predicate)), context);
+ }
+
+ // Determine whether all of the elements match a truth test.
+ 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;
+ }
+ return true;
+ }
+
+ // Determine if at least one element in the object matches a truth test.
+ 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;
+ }
+ return false;
+ }
+
+ // Determine if the array or object contains a given item (using `===`).
+ 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;
+ }
+
+ // Invoke a method (with arguments) on every item in a collection.
+ var invoke = restArguments(function(obj, path, args) {
+ var contextPath, func;
+ if (isFunction(path)) {
+ func = path;
+ } else if (isArray(path)) {
+ contextPath = path.slice(0, -1);
+ path = path[path.length - 1];
+ }
+ return map(obj, function(context) {
+ var method = func;
+ if (!method) {
+ 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);
+ });
+ });
+
+ // Convenience version of a common use case of `map`: fetching a property.
+ function pluck(obj, key) {
+ return map(obj, property(key));
+ }
+
+ // Convenience version of a common use case of `filter`: selecting only objects
+ // containing specific `key:value` pairs.
+ function where(obj, attrs) {
+ return filter(obj, matcher(attrs));
+ }
+
+ // Convenience version of a common use case of `find`: getting the first object
+ // containing specific `key:value` pairs.
+ function findWhere(obj, attrs) {
+ return find(obj, matcher(attrs));
+ }
+
+ // Return the maximum element (or element-based computation).
+ 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++) {
+ 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) {
+ result = v;
+ lastComputed = computed;
+ }
+ });
+ }
+ return result;
+ }
+
+ // Return the minimum element (or element-based computation).
+ 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++) {
+ 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) {
+ result = v;
+ lastComputed = computed;
+ }
+ });
+ }
+ return result;
+ }
+
+ // Shuffle a collection.
+ function shuffle(obj) {
+ return sample(obj, Infinity);
+ }
+
+ // Sample **n** random values from a collection using the modern version of the
+ // [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle).
+ // If **n** is not specified, returns a single random element.
+ // The internal `guard` argument allows it to work with `map`.
+ function sample(obj, n, guard) {
+ if (n == null || guard) {
+ if (!isArrayLike(obj)) obj = values(obj);
+ return obj[random(obj.length - 1)];
+ }
+ var sample = isArrayLike(obj) ? clone(obj) : values(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);
+ }
+
+ // Sort the object's values by a criterion produced by an iteratee.
+ function sortBy(obj, iteratee, context) {
+ var index = 0;
+ iteratee = cb(iteratee, context);
+ return pluck(map(obj, function(value, key, list) {
+ return {
+ value: value,
+ index: index++,
+ criteria: iteratee(value, key, list)
+ };
+ }).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;
+ }
+ return left.index - right.index;
+ }), 'value');
+ }
+
+ // An internal function used for aggregate "group by" operations.
+ 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);
+ });
+ return result;
+ };
+ }
+
+ // Groups the object's values by a criterion. Pass either a string attribute
+ // to group by, or a function that returns the criterion.
+ var groupBy = group(function(result, value, key) {
+ if (_has(result, key)) result[key].push(value); else result[key] = [value];
+ });
+
+ // Indexes the object's values by a criterion, similar to `groupBy`, but for
+ // when you know that your index values will be unique.
+ var indexBy = group(function(result, value, key) {
+ result[key] = value;
+ });
+
+ // Counts instances of an object that group by a certain criterion. Pass
+ // either a string attribute to count by, or a function that returns the
+ // criterion.
+ var countBy = group(function(result, value, key) {
+ if (_has(result, key)) result[key]++; else result[key] = 1;
+ });
+
+ var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;
+ // Safely create a real, live array from anything iterable.
+ function toArray(obj) {
+ if (!obj) return [];
+ if (isArray(obj)) return slice.call(obj);
+ if (isString(obj)) {
+ // Keep surrogate pair characters together
+ return obj.match(reStrSymbol);
+ }
+ if (isArrayLike(obj)) return map(obj, identity);
+ return values(obj);
+ }
+
+ // Return the number of elements in an object.
+ function size(obj) {
+ if (obj == null) return 0;
+ return isArrayLike(obj) ? obj.length : keys(obj).length;
+ }
+
+ // Split a collection into two arrays: one whose elements all satisfy the given
+ // predicate, and one whose elements all do not satisfy the predicate.
+ var partition = group(function(result, value, pass) {
+ result[pass ? 0 : 1].push(value);
+ }, true);
+
+ // Array Functions
+ // ---------------
+
+ // Get the first element of an array. Passing **n** will return the first N
+ // values in the array. The **guard** check allows it to work with `map`.
+ function first(array, n, guard) {
+ if (array == null || array.length < 1) return n == null ? void 0 : [];
+ if (n == null || guard) return array[0];
+ return initial(array, array.length - n);
+ }
+
+ // Returns everything but the last entry of the array. Especially useful on
+ // the arguments object. Passing **n** will return all the values in
+ // the array, excluding the last N.
+ function initial(array, n, guard) {
+ return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
+ }
+
+ // Get the last element of an array. Passing **n** will return the last N
+ // values in the array.
+ function last(array, n, guard) {
+ if (array == null || array.length < 1) return n == null ? void 0 : [];
+ if (n == null || guard) return array[array.length - 1];
+ return rest(array, Math.max(0, array.length - n));
+ }
+
+ // Returns everything but the first entry of the array. Especially useful on
+ // the arguments object. Passing an **n** will return the rest N values in the
+ // array.
+ function rest(array, n, guard) {
+ return slice.call(array, n == null || guard ? 1 : n);
+ }
+
+ // Trim out all falsy values from an array.
+ function compact(array) {
+ return filter(array, Boolean);
+ }
+
+ // Internal implementation of a recursive `flatten` function.
+ function _flatten(input, shallow, strict, output) {
+ output = output || [];
+ 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))) {
+ // Flatten current level of array or arguments object.
+ if (shallow) {
+ var j = 0, len = value.length;
+ while (j < len) output[idx++] = value[j++];
+ } else {
+ _flatten(value, shallow, strict, output);
+ idx = output.length;
+ }
+ } else if (!strict) {
+ output[idx++] = value;
+ }
+ }
+ return output;
+ }
+
+ // Flatten out an array, either recursively (by default), or just one level.
+ function flatten(array, shallow) {
+ return _flatten(array, shallow, false);
+ }
+
+ // Return a version of the array that does not contain the specified value(s).
+ var without = restArguments(function(array, otherArrays) {
+ return difference(array, otherArrays);
+ });
+
+ // Produce a duplicate-free version of the array. If the array has already
+ // been sorted, you have the option of using a faster algorithm.
+ // The faster algorithm will not work with an iteratee if the iteratee
+ // is not a one-to-one function, so providing an iteratee will disable
+ // the faster algorithm.
+ function uniq(array, isSorted, iteratee, context) {
+ if (!isBoolean(isSorted)) {
+ context = iteratee;
+ iteratee = isSorted;
+ isSorted = false;
+ }
+ if (iteratee != null) iteratee = cb(iteratee, context);
+ var result = [];
+ var seen = [];
+ for (var i = 0, length = getLength(array); i < length; i++) {
+ var value = array[i],
+ computed = iteratee ? iteratee(value, i, array) : value;
+ if (isSorted && !iteratee) {
+ if (!i || seen !== computed) result.push(value);
+ seen = computed;
+ } else if (iteratee) {
+ if (!contains(seen, computed)) {
+ seen.push(computed);
+ result.push(value);
+ }
+ } else if (!contains(result, value)) {
+ result.push(value);
+ }
+ }
+ return result;
+ }
+
+ // Produce an array that contains the union: each distinct element from all of
+ // the passed-in arrays.
+ var union = restArguments(function(arrays) {
+ return uniq(_flatten(arrays, true, true));
+ });
+
+ // Produce an array that contains every item shared between all the
+ // passed-in arrays.
+ function intersection(array) {
+ var result = [];
+ var argsLength = arguments.length;
+ for (var i = 0, length = getLength(array); i < length; i++) {
+ var item = array[i];
+ if (contains(result, item)) continue;
+ var j;
+ for (j = 1; j < argsLength; j++) {
+ if (!contains(arguments[j], item)) break;
+ }
+ if (j === argsLength) result.push(item);
+ }
+ return result;
+ }
+
+ // Take the difference between one array and a number of other arrays.
+ // Only the elements present in just the first array will remain.
+ var difference = restArguments(function(array, rest) {
+ rest = _flatten(rest, true, true);
+ return filter(array, function(value){
+ return !contains(rest, value);
+ });
+ });
+
+ // Complement of zip. Unzip accepts an array of arrays and groups
+ // each array's elements on shared indices.
+ 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);
+ }
+ return result;
+ }
+
+ // Zip together multiple lists into a single array -- elements that share
+ // an index go together.
+ var zip = restArguments(unzip);
+
+ // Converts lists into objects. Pass either a single array of `[key, value]`
+ // pairs, or two parallel arrays of the same length -- one of keys, and one of
+ // the corresponding values. Passing by pairs is the reverse of pairs.
+ function object(list, values) {
+ var result = {};
+ for (var i = 0, length = getLength(list); i < length; i++) {
+ if (values) {
+ result[list[i]] = values[i];
+ } else {
+ result[list[i][0]] = list[i][1];
+ }
+ }
+ return result;
+ }
+
+ // Generator function to create the findIndex and findLastIndex functions.
+ 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;
+ };
+ }
+
+ // Returns the first index on an array-like that passes a predicate test.
+ var findIndex = createPredicateIndexFinder(1);
+ var findLastIndex = createPredicateIndexFinder(-1);
+
+ // Use a comparator function to figure out the smallest index at which
+ // an object should be inserted so as to maintain order. Uses binary search.
+ 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;
+ }
+
+ // Generator function to create the indexOf and lastIndexOf functions.
+ 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);
+ } else {
+ 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;
+ }
+ if (item !== item) {
+ 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 the position of the first occurrence of an item in an array,
+ // or -1 if the item is not included in the array.
+ // If the array is large and already in sort order, pass `true`
+ // for **isSorted** to use binary search.
+ var indexOf = createIndexFinder(1, findIndex, sortedIndex);
+ var lastIndexOf = createIndexFinder(-1, findLastIndex);
+
+ // Generate an integer Array containing an arithmetic progression. A port of
+ // the native Python `range()` function. See
+ // [the Python documentation](https://docs.python.org/library/functions.html#range).
+ function range(start, stop, step) {
+ if (stop == null) {
+ stop = start || 0;
+ start = 0;
+ }
+ if (!step) {
+ step = stop < start ? -1 : 1;
+ }
+
+ 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;
+ }
+
+ return range;
+ }
+
+ // Chunk a single array into multiple arrays, each containing `count` or fewer
+ // items.
+ function chunk(array, count) {
+ if (count == null || count < 1) return [];
+ var result = [];
+ var i = 0, length = array.length;
+ while (i < length) {
+ result.push(slice.call(array, i, i += count));
+ }
+ return result;
+ }
+
+ // Function (ahem) Functions
+ // ------------------
+
+ // Determines whether to execute a function as a constructor
+ // or a normal function with the provided arguments.
+ 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;
+ }
+
+ // Create a function bound to a given object (assigning `this`, and arguments,
+ // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if
+ // available.
+ var bind = 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;
+ });
+
+ // Partially apply a function by creating a version that has had some of its
+ // arguments pre-filled, without changing its dynamic `this` context. _ acts
+ // as a placeholder by default, allowing any combination of arguments to be
+ // pre-filled. Set `partial.placeholder` for a custom placeholder argument.
+ 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];
+ }
+ while (position < arguments.length) args.push(arguments[position++]);
+ return executeBound(func, bound, this, this, args);
+ };
+ return bound;
+ });
+
+ partial.placeholder = _;
+
+ // Bind a number of an object's methods to that object. Remaining arguments
+ // are the method names to be bound. Useful for ensuring that all callbacks
+ // defined on an object belong to it.
+ var bindAll = 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);
+ }
+ });
+
+ // Memoize an expensive function by storing its results.
+ 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 = {};
+ return memoize;
+ }
+
+ // Delays a function for the given number of milliseconds, and then calls
+ // it with the arguments supplied.
+ var delay = restArguments(function(func, wait, args) {
+ return setTimeout(function() {
+ return func.apply(null, args);
+ }, wait);
+ });
+
+ // Defers a function, scheduling it to run after the current call stack has
+ // cleared.
+ var defer = partial(delay, _, 1);
+
+ // Returns a function, that, when invoked, will only be triggered at most once
+ // during a given window of time. Normally, the throttled function will run
+ // as much as it can, without ever going more than once per `wait` duration;
+ // but if you'd like to disable the execution on the leading edge, pass
+ // `{leading: false}`. To disable execution on the trailing edge, ditto.
+ 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();
+ timeout = null;
+ result = func.apply(context, args);
+ if (!timeout) context = args = null;
+ };
+
+ var throttled = function() {
+ var _now = now();
+ if (!previous && options.leading === false) previous = _now;
+ var remaining = wait - (_now - previous);
+ context = this;
+ args = arguments;
+ if (remaining <= 0 || remaining > wait) {
+ if (timeout) {
+ clearTimeout(timeout);
+ timeout = null;
+ }
+ previous = _now;
+ result = func.apply(context, args);
+ if (!timeout) context = args = null;
+ } else if (!timeout && options.trailing !== false) {
+ timeout = setTimeout(later, remaining);
+ }
+ return result;
+ };
+
+ throttled.cancel = function() {
+ clearTimeout(timeout);
+ previous = 0;
+ timeout = context = args = null;
+ };
+
+ return throttled;
+ }
+
+ // Returns a function, that, as long as it continues to be invoked, will not
+ // be triggered. The function will be called after it stops being called for
+ // N milliseconds. If `immediate` is passed, trigger the function on the
+ // leading edge, instead of the trailing.
+ function debounce(func, wait, immediate) {
+ var timeout, result;
+
+ var later = function(context, args) {
+ timeout = null;
+ if (args) result = func.apply(context, args);
+ };
+
+ var debounced = restArguments(function(args) {
+ if (timeout) clearTimeout(timeout);
+ if (immediate) {
+ var callNow = !timeout;
+ timeout = setTimeout(later, wait);
+ if (callNow) result = func.apply(this, args);
+ } else {
+ timeout = delay(later, wait, this, args);
+ }
+
+ return result;
+ });
+
+ debounced.cancel = function() {
+ clearTimeout(timeout);
+ timeout = null;
+ };
+
+ return debounced;
+ }
+
+ // Returns the first function passed as an argument to the second,
+ // allowing you to adjust arguments, run code before and after, and
+ // conditionally execute the original function.
+ function wrap(func, wrapper) {
+ return partial(wrapper, func);
+ }
+
+ // Returns a negated version of the passed-in predicate.
+ function negate(predicate) {
+ return function() {
+ return !predicate.apply(this, arguments);
+ };
+ }
+
+ // Returns a function that is the composition of a list of functions, each
+ // consuming the return value of the function that follows.
+ 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);
+ return result;
+ };
+ }
+
+ // Returns a function that will only be executed on and after the Nth call.
+ function after(times, func) {
+ return function() {
+ if (--times < 1) {
+ return func.apply(this, arguments);
+ }
+ };
+ }
+
+ // Returns a function that will only be executed up to (but not including) the Nth call.
+ function before(times, func) {
+ var memo;
+ return function() {
+ if (--times > 0) {
+ memo = func.apply(this, arguments);
+ }
+ if (times <= 1) func = null;
+ return memo;
+ };
+ }
+
+ // Returns a function that will be executed at most one time, no matter how
+ // often you call it. Useful for lazy initialization.
+ var once = partial(before, 2);
+
+ // Object Functions
+ // ----------------
+
+ // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.
+ var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');
+ var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',
+ 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
+
+ function collectNonEnumProps(obj, _keys) {
+ var nonEnumIdx = nonEnumerableProps.length;
+ var constructor = obj.constructor;
+ var proto = isFunction(constructor) && constructor.prototype || ObjProto;
+
+ // Constructor is a special case.
+ var prop = 'constructor';
+ if (_has(obj, prop) && !contains(_keys, prop)) _keys.push(prop);
+
+ while (nonEnumIdx--) {
+ prop = nonEnumerableProps[nonEnumIdx];
+ if (prop in obj && obj[prop] !== proto[prop] && !contains(_keys, prop)) {
+ _keys.push(prop);
+ }
+ }
+ }
+
+ // Retrieve the names of an object's own properties.
+ // Delegates to **ECMAScript 5**'s native `Object.keys`.
+ 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);
+ // Ahem, IE < 9.
+ if (hasEnumBug) collectNonEnumProps(obj, _keys);
+ return _keys;
+ }
+
+ // Retrieve all the property names of an object.
+ function allKeys(obj) {
+ if (!isObject(obj)) return [];
+ var _keys = [];
+ for (var key in obj) _keys.push(key);
+ // Ahem, IE < 9.
+ if (hasEnumBug) collectNonEnumProps(obj, _keys);
+ return _keys;
+ }
+
+ // Retrieve the values of an object's properties.
+ 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]];
+ }
+ return values;
+ }
+
+ // Returns the results of applying the iteratee to each element of the object.
+ // In contrast to map it returns an object.
+ 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);
+ }
+ return results;
+ }
+
+ // Convert an object into a list of `[key, value]` pairs.
+ // The opposite of object.
+ 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]]];
+ }
+ return pairs;
+ }
+
+ // Invert the keys and values of an object. The values must be serializable.
+ function invert(obj) {
+ var result = {};
+ var _keys = keys(obj);
+ for (var i = 0, length = _keys.length; i < length; i++) {
+ result[obj[_keys[i]]] = _keys[i];
+ }
+ return result;
+ }
+
+ // Return a sorted list of the function names available on the object.
+ function functions(obj) {
+ var names = [];
+ for (var key in obj) {
+ if (isFunction(obj[key])) names.push(key);
+ }
+ return names.sort();
+ }
+
+ // An internal function for creating assigner functions.
+ 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;
+ for (var i = 0; i < l; i++) {
+ var key = _keys[i];
+ if (!defaults || obj[key] === void 0) obj[key] = source[key];
+ }
+ }
+ return obj;
+ };
+ }
+
+ // Extend a given object with all the properties in passed-in object(s).
+ var extend = createAssigner(allKeys);
+
+ // Assigns a given object with all the own properties in the passed-in object(s).
+ // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
+ var extendOwn = createAssigner(keys);
+
+ // Returns the first key on an object that passes a predicate test.
+ 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;
+ }
+ }
+
+ // Internal pick helper function to determine if `obj` has key `key`.
+ function keyInObj(value, key, obj) {
+ return key in obj;
+ }
+
+ // Return a copy of the object only containing the whitelisted properties.
+ var pick = 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);
+ } else {
+ iteratee = keyInObj;
+ _keys = _flatten(_keys, false, false);
+ obj = Object(obj);
+ }
+ 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;
+ }
+ return result;
+ });
+
+ // Return a copy of the object without the blacklisted properties.
+ var omit = restArguments(function(obj, _keys) {
+ var iteratee = _keys[0], context;
+ 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);
+ };
+ }
+ return pick(obj, iteratee, context);
+ });
+
+ // Fill in a given object with default properties.
+ var defaults = createAssigner(allKeys, true);
+
+ // Creates an object that inherits from the given prototype object.
+ // If additional properties are provided then they will be added to the
+ // created object.
+ function create(prototype, props) {
+ var result = baseCreate(prototype);
+ if (props) extendOwn(result, props);
+ return result;
+ }
+
+ // Create a (shallow-cloned) duplicate of an object.
+ function clone(obj) {
+ if (!isObject(obj)) return obj;
+ return isArray(obj) ? obj.slice() : extend({}, obj);
+ }
+
+ // Invokes interceptor with the obj, and then returns obj.
+ // The primary purpose of this method is to "tap into" a method chain, in
+ // order to perform operations on intermediate results within the chain.
+ function tap(obj, interceptor) {
+ interceptor(obj);
+ return obj;
+ }
+
+ // Returns whether an object has a given set of `key:value` pairs.
+ function isMatch(object, attrs) {
+ var _keys = keys(attrs), length = _keys.length;
+ if (object == null) return !length;
+ 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;
+ }
+ return true;
+ }
+
+
+ // Internal recursive comparison function for `isEqual`.
+ function eq(a, b, aStack, bStack) {
+ // Identical objects are equal. `0 === -0`, but they aren't identical.
+ // See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal).
+ if (a === b) return a !== 0 || 1 / a === 1 / b;
+ // `null` or `undefined` only equal to itself (strict comparison).
+ if (a == null || b == null) return false;
+ // `NaN`s are equivalent, but non-reflexive.
+ if (a !== a) return b !== b;
+ // Exhaust primitive checks
+ var type = typeof a;
+ if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;
+ return deepEq(a, b, aStack, bStack);
+ }
+
+ // Internal recursive comparison function for `isEqual`.
+ function deepEq(a, b, aStack, bStack) {
+ // Unwrap any wrapped objects.
+ if (a instanceof _) a = a._wrapped;
+ if (b instanceof _) b = b._wrapped;
+ // Compare `[[Class]]` names.
+ var className = toString.call(a);
+ if (className !== toString.call(b)) return false;
+ switch (className) {
+ // Strings, numbers, regular expressions, dates, and booleans are compared by value.
+ case '[object RegExp]':
+ // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')
+ case '[object String]':
+ // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
+ // equivalent to `new String("5")`.
+ return '' + a === '' + b;
+ case '[object Number]':
+ // `NaN`s are equivalent, but non-reflexive.
+ // Object(NaN) is equivalent to NaN.
+ if (+a !== +a) return +b !== +b;
+ // An `egal` comparison is performed for other numeric values.
+ return +a === 0 ? 1 / +a === 1 / b : +a === +b;
+ case '[object Date]':
+ case '[object Boolean]':
+ // Coerce dates and booleans to numeric primitive values. Dates are compared by their
+ // millisecond representations. Note that invalid dates with millisecond representations
+ // of `NaN` are not equivalent.
+ return +a === +b;
+ case '[object Symbol]':
+ return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);
+ }
+
+ var areArrays = className === '[object Array]';
+ if (!areArrays) {
+ if (typeof a != 'object' || typeof b != 'object') return false;
+
+ // Objects with different constructors are not equivalent, but `Object`s or `Array`s
+ // from different frames are.
+ 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;
+ }
+ }
+ // Assume equality for cyclic structures. The algorithm for detecting cyclic
+ // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
+
+ // Initializing stack of traversed objects.
+ // It's done here since we only need them for objects and arrays comparison.
+ aStack = aStack || [];
+ bStack = bStack || [];
+ var length = aStack.length;
+ while (length--) {
+ // Linear search. Performance is inversely proportional to the number of
+ // unique nested structures.
+ if (aStack[length] === a) return bStack[length] === b;
+ }
+
+ // Add the first object to the stack of traversed objects.
+ aStack.push(a);
+ bStack.push(b);
+
+ // Recursively compare objects and arrays.
+ if (areArrays) {
+ // Compare array lengths to determine if a deep comparison is necessary.
+ length = a.length;
+ if (length !== b.length) return false;
+ // Deep compare the contents, ignoring non-numeric properties.
+ while (length--) {
+ if (!eq(a[length], b[length], aStack, bStack)) return false;
+ }
+ } else {
+ // Deep compare objects.
+ var _keys = keys(a), key;
+ length = _keys.length;
+ // Ensure that both objects contain the same number of properties before comparing deep equality.
+ if (keys(b).length !== length) return false;
+ while (length--) {
+ // Deep compare each member
+ key = _keys[length];
+ if (!(_has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
+ }
+ }
+ // Remove the first object from the stack of traversed objects.
+ aStack.pop();
+ bStack.pop();
+ return true;
+ }
+
+ // Perform a deep comparison to check if two objects are equal.
+ function isEqual(a, b) {
+ return eq(a, b);
+ }
+
+ // Is a given array, string, or object empty?
+ // An "empty" object has no enumerable own-properties.
+ function isEmpty(obj) {
+ if (obj == null) return true;
+ if (isArrayLike(obj) && (isArray(obj) || isString(obj) || isArguments(obj))) return obj.length === 0;
+ return keys(obj).length === 0;
+ }
+
+ // Is a given value a DOM element?
+ function isElement(obj) {
+ return !!(obj && obj.nodeType === 1);
+ }
+
+ // Internal function for creating a toString-based type tester.
+ function tagTester(name) {
+ return function(obj) {
+ return toString.call(obj) === '[object ' + name + ']';
+ };
+ }
+
+ // Is a given value an array?
+ // Delegates to ECMA5's native Array.isArray
+ var isArray = nativeIsArray || tagTester('Array');
+
+ // Is a given variable an object?
+ function isObject(obj) {
+ var type = typeof obj;
+ return type === 'function' || type === 'object' && !!obj;
+ }
+
+ // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError, isMap, isWeakMap, isSet, isWeakSet.
+ var isArguments = tagTester('Arguments');
+ var isFunction = tagTester('Function');
+ var isString = tagTester('String');
+ var isNumber = tagTester('Number');
+ var isDate = tagTester('Date');
+ var isRegExp = tagTester('RegExp');
+ var isError = tagTester('Error');
+ var isSymbol = tagTester('Symbol');
+ var isMap = tagTester('Map');
+ var isWeakMap = tagTester('WeakMap');
+ var isSet = tagTester('Set');
+ var isWeakSet = tagTester('WeakSet');
+
+ // Define a fallback version of the method in browsers (ahem, IE < 9), where
+ // there isn't any inspectable "Arguments" type.
+ (function() {
+ if (!isArguments(arguments)) {
+ isArguments = function(obj) {
+ return _has(obj, 'callee');
+ };
+ }
+ }());
+
+ // Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8,
+ // IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).
+ var nodelist = root.document && root.document.childNodes;
+ if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {
+ isFunction = function(obj) {
+ return typeof obj == 'function' || false;
+ };
+ }
+
+ // Is a given object a finite number?
+ function isFinite(obj) {
+ return !isSymbol(obj) && _isFinite(obj) && !_isNaN(parseFloat(obj));
+ }
+
+ // Is the given value `NaN`?
+ function isNaN(obj) {
+ return isNumber(obj) && _isNaN(obj);
+ }
+
+ // Is a given value a boolean?
+ function isBoolean(obj) {
+ return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
+ }
+
+ // Is a given value equal to null?
+ function isNull(obj) {
+ return obj === null;
+ }
+
+ // Is a given variable undefined?
+ function isUndefined(obj) {
+ return obj === void 0;
+ }
+
+ // Shortcut function for checking if an object has a given property directly
+ // on itself (in other words, not on a prototype).
+ function has(obj, path) {
+ if (!isArray(path)) {
+ return _has(obj, path);
+ }
+ var length = path.length;
+ for (var i = 0; i < length; i++) {
+ var key = path[i];
+ if (obj == null || !hasOwnProperty.call(obj, key)) {
+ return false;
+ }
+ obj = obj[key];
+ }
+ return !!length;
+ }
+
+ // Utility Functions
+ // -----------------
+
+ // Keep the identity function around for default iteratees.
+ function identity(value) {
+ return value;
+ }
+
+ // Predicate-generating functions. Often useful outside of Underscore.
+ function constant(value) {
+ return function() {
+ return value;
+ };
+ }
+
+ function noop(){}
+
+ // Creates a function that, when passed an object, will traverse that object’s
+ // properties down the given `path`, specified as an array of keys or indexes.
+ function property(path) {
+ if (!isArray(path)) {
+ return shallowProperty(path);
+ }
+ return function(obj) {
+ return deepGet(obj, path);
+ };
+ }
+
+ // Generates a function for a given object that returns a given property.
+ function propertyOf(obj) {
+ if (obj == null) {
+ return function(){};
+ }
+ return function(path) {
+ return !isArray(path) ? obj[path] : deepGet(obj, path);
+ };
+ }
+
+ // Returns a predicate for checking whether an object has a given set of
+ // `key:value` pairs.
+ function matcher(attrs) {
+ attrs = extendOwn({}, attrs);
+ return function(obj) {
+ return isMatch(obj, attrs);
+ };
+ }
+
+ // Run a function **n** times.
+ 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;
+ }
+
+ // Return a random integer between min and max (inclusive).
+ function random(min, max) {
+ if (max == null) {
+ max = min;
+ min = 0;
+ }
+ return min + Math.floor(Math.random() * (max - min + 1));
+ }
+
+ // A (possibly faster) way to get the current timestamp as an integer.
+ var now = Date.now || function() {
+ return new Date().getTime();
+ };
+
+ // List of HTML entities for escaping.
+ var escapeMap = {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ "'": ''',
+ '`': '`'
+ };
+ var unescapeMap = invert(escapeMap);
+
+ // Functions for escaping and unescaping strings to/from HTML interpolation.
+ function createEscaper(map) {
+ var escaper = function(match) {
+ return map[match];
+ };
+ // Regexes for identifying a key that needs to be escaped.
+ 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 escape = createEscaper(escapeMap);
+ var unescape = createEscaper(unescapeMap);
+
+ // Traverses the children of `obj` along `path`. If a child is a function, it
+ // is invoked with its parent as context. Returns the value of the final
+ // child, or `fallback` if any child is undefined.
+ function result(obj, path, fallback) {
+ if (!isArray(path)) path = [path];
+ var length = path.length;
+ if (!length) {
+ 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.
+ }
+ obj = isFunction(prop) ? prop.call(obj) : prop;
+ }
+ return obj;
+ }
+
+ // Generate a unique integer id (unique within the entire client session).
+ // Useful for temporary DOM ids.
+ var idCounter = 0;
+ function uniqueId(prefix) {
+ var id = ++idCounter + '';
+ return prefix ? prefix + id : id;
+ }
+
+ // By default, Underscore uses ERB-style template delimiters, change the
+ // following template settings to use alternative delimiters.
+ var templateSettings = _.templateSettings = {
+ evaluate: /<%([\s\S]+?)%>/g,
+ interpolate: /<%=([\s\S]+?)%>/g,
+ escape: /<%-([\s\S]+?)%>/g
+ };
+
+ // When customizing `templateSettings`, if you don't want to define an
+ // interpolation, evaluation or escaping regex, we need one that is
+ // guaranteed not to match.
+ var noMatch = /(.)^/;
+
+ // Certain characters need to be escaped so that they can be put into a
+ // string literal.
+ var escapes = {
+ "'": "'",
+ '\\': '\\',
+ '\r': 'r',
+ '\n': 'n',
+ '\u2028': 'u2028',
+ '\u2029': 'u2029'
+ };
+
+ var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g;
+
+ var escapeChar = function(match) {
+ return '\\' + escapes[match];
+ };
+
+ // JavaScript micro-templating, similar to John Resig's implementation.
+ // Underscore templating handles arbitrary delimiters, preserves whitespace,
+ // and correctly escapes quotes within interpolated code.
+ // NB: `oldSettings` only exists for backwards compatibility.
+ function template(text, settings, oldSettings) {
+ if (!settings && oldSettings) settings = oldSettings;
+ settings = defaults({}, settings, _.templateSettings);
+
+ // Combine delimiters into one regular expression via alternation.
+ var matcher = RegExp([
+ (settings.escape || noMatch).source,
+ (settings.interpolate || noMatch).source,
+ (settings.evaluate || noMatch).source
+ ].join('|') + '|$', 'g');
+
+ // Compile the template source, escaping string literals appropriately.
+ 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;
+
+ if (escape) {
+ source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
+ } else if (interpolate) {
+ source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
+ } else if (evaluate) {
+ source += "';\n" + evaluate + "\n__p+='";
+ }
+
+ // Adobe VMs need the match returned to produce the correct offset.
+ return match;
+ });
+ source += "';\n";
+
+ // If a variable is not specified, place data values in local scope.
+ if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\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(settings.variable || 'obj', '_', source);
+ } catch (e) {
+ e.source = source;
+ throw e;
+ }
+
+ var template = function(data) {
+ return render.call(this, data, _);
+ };
+
+ // Provide the compiled source as a convenience for precompilation.
+ var argument = settings.variable || 'obj';
+ template.source = 'function(' + argument + '){\n' + source + '}';
+
+ return template;
+ }
+
+ // Add a "chain" function. Start chaining a wrapped Underscore object.
+ function chain(obj) {
+ var instance = _(obj);
+ instance._chain = true;
+ return instance;
+ }
+
+ // OOP
+ // ---------------
+ // If Underscore is called as a function, it returns a wrapped object that
+ // can be used OO-style. This wrapper holds altered versions of all the
+ // underscore functions. Wrapped objects may be chained.
+
+ // Helper function to continue chaining intermediate results.
+ function chainResult(instance, obj) {
+ return instance._chain ? _(obj).chain() : obj;
+ }
+
+ // Add your own custom functions to the Underscore object.
+ 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));
+ };
+ });
+ return _;
+ }
+
+ // Add all mutator Array functions to the wrapper.
+ each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
+ var method = ArrayProto[name];
+ _.prototype[name] = function() {
+ var obj = this._wrapped;
+ method.apply(obj, arguments);
+ if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0];
+ return chainResult(this, obj);
+ };
+ });
+
+ // Add all accessor Array functions to the wrapper.
+ each(['concat', 'join', 'slice'], function(name) {
+ var method = ArrayProto[name];
+ _.prototype[name] = function() {
+ return chainResult(this, method.apply(this._wrapped, arguments));
+ };
+ });
+
+ // Extracts the result from a wrapped and chained object.
+ _.prototype.value = function() {
+ return this._wrapped;
+ };
+
+ // Provide unwrapping proxy for some methods used in engine operations
+ // such as arithmetic and JSON stringification.
+ _.prototype.valueOf = _.prototype.toJSON = _.prototype.value;
+
+ _.prototype.toString = function() {
+ return String(this._wrapped);
+ };
+
+ var allExports = ({
+ 'default': _,
+ VERSION: VERSION,
+ iteratee: iteratee,
+ restArguments: restArguments,
+ each: each,
+ forEach: each,
+ map: map,
+ collect: map,
+ reduce: reduce,
+ foldl: reduce,
+ inject: reduce,
+ reduceRight: reduceRight,
+ foldr: reduceRight,
+ find: find,
+ detect: find,
+ filter: filter,
+ select: filter,
+ reject: reject,
+ every: every,
+ all: every,
+ some: some,
+ any: some,
+ contains: contains,
+ includes: contains,
+ include: contains,
+ invoke: invoke,
+ pluck: pluck,
+ where: where,
+ findWhere: findWhere,
+ max: max,
+ min: min,
+ shuffle: shuffle,
+ sample: sample,
+ sortBy: sortBy,
+ groupBy: groupBy,
+ indexBy: indexBy,
+ countBy: countBy,
+ toArray: toArray,
+ size: size,
+ partition: partition,
+ first: first,
+ head: first,
+ take: first,
+ initial: initial,
+ last: last,
+ rest: rest,
+ tail: rest,
+ drop: rest,
+ compact: compact,
+ flatten: flatten,
+ without: without,
+ uniq: uniq,
+ unique: uniq,
+ union: union,
+ intersection: intersection,
+ difference: difference,
+ unzip: unzip,
+ zip: zip,
+ object: object,
+ findIndex: findIndex,
+ findLastIndex: findLastIndex,
+ sortedIndex: sortedIndex,
+ indexOf: indexOf,
+ lastIndexOf: lastIndexOf,
+ range: range,
+ chunk: chunk,
+ bind: bind,
+ partial: partial,
+ bindAll: bindAll,
+ memoize: memoize,
+ delay: delay,
+ defer: defer,
+ throttle: throttle,
+ debounce: debounce,
+ wrap: wrap,
+ negate: negate,
+ compose: compose,
+ after: after,
+ before: before,
+ once: once,
+ keys: keys,
+ allKeys: allKeys,
+ values: values,
+ mapObject: mapObject,
+ pairs: pairs,
+ invert: invert,
+ functions: functions,
+ methods: functions,
+ extend: extend,
+ extendOwn: extendOwn,
+ assign: extendOwn,
+ findKey: findKey,
+ pick: pick,
+ omit: omit,
+ defaults: defaults,
+ create: create,
+ clone: clone,
+ tap: tap,
+ isMatch: isMatch,
+ isEqual: isEqual,
+ isEmpty: isEmpty,
+ isElement: isElement,
+ isArray: isArray,
+ isObject: isObject,
+ isArguments: isArguments,
+ isFunction: isFunction,
+ isString: isString,
+ isNumber: isNumber,
+ isDate: isDate,
+ isRegExp: isRegExp,
+ isError: isError,
+ isSymbol: isSymbol,
+ isMap: isMap,
+ isWeakMap: isWeakMap,
+ isSet: isSet,
+ isWeakSet: isWeakSet,
+ isFinite: isFinite,
+ isNaN: isNaN,
+ isBoolean: isBoolean,
+ isNull: isNull,
+ isUndefined: isUndefined,
+ has: has,
+ identity: identity,
+ constant: constant,
+ noop: noop,
+ property: property,
+ propertyOf: propertyOf,
+ matcher: matcher,
+ matches: matcher,
+ times: times,
+ random: random,
+ now: now,
+ escape: escape,
+ unescape: unescape,
+ result: result,
+ uniqueId: uniqueId,
+ templateSettings: templateSettings,
+ template: template,
+ chain: chain,
+ mixin: mixin
+ });
+
+ // Add all of the Underscore functions to the wrapper object and return it.
+ var indexDefault = mixin(allExports);
+
+ return indexDefault;
+
+})));
+//# sourceMappingURL=underscore.js.map
diff --git a/underscore.js.map b/underscore.js.map
new file mode 100644
index 000000000..cc96106cc
--- /dev/null
+++ b/underscore.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"underscore.js","sources":["modules/index.js","modules/index-default.js"],"sourcesContent":["// Underscore.js 1.9.2\n// https://underscorejs.org\n// (c) 2009-2018 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n// Underscore may be freely distributed under the MIT license.\n\n// Baseline setup\n// --------------\n\n// Establish the root object, `window` (`self`) in the browser, `global`\n// on the server, or `this` in some virtual machines. We use `self`\n// instead of `window` for `WebWorker` support.\nvar root = typeof self == 'object' && self.self === self && self ||\n typeof global == 'object' && global.global === global && global ||\n Function('return this')() ||\n {};\n\n// Save bytes in the minified (but not gzipped) version:\nvar ArrayProto = Array.prototype, ObjProto = Object.prototype;\nvar SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;\n\n// Create quick reference variables for speed access to core prototypes.\nvar push = ArrayProto.push,\n slice = ArrayProto.slice,\n toString = ObjProto.toString,\n hasOwnProperty = ObjProto.hasOwnProperty;\n\n// All **ECMAScript 5** native function implementations that we hope to use\n// are declared here.\nvar nativeIsArray = Array.isArray,\n nativeKeys = Object.keys,\n nativeCreate = Object.create;\n\n// Create references to these builtin functions because we override them.\nvar _isNaN = root.isNaN,\n _isFinite = root.isFinite;\n\n// Naked function reference for surrogate-prototype-swapping.\nvar Ctor = function(){};\n\n// The Underscore object. All exported functions below are added to it in the\n// modules/index-all.js using the mixin function.\nexport default function _(obj) {\n if (obj instanceof _) return obj;\n if (!(this instanceof _)) return new _(obj);\n this._wrapped = obj;\n}\n\n// Current version.\nexport var VERSION = _.VERSION = '1.9.2';\n\n// Internal function that returns an efficient (for current engines) version\n// of the passed-in callback, to be repeatedly applied in other Underscore\n// functions.\nfunction optimizeCb(func, context, argCount) {\n if (context === void 0) return func;\n switch (argCount == null ? 3 : argCount) {\n case 1: return function(value) {\n return func.call(context, value);\n };\n // The 2-argument case is omitted because we’re not using it.\n case 3: return function(value, index, collection) {\n return func.call(context, value, index, collection);\n };\n case 4: return function(accumulator, value, index, collection) {\n return func.call(context, accumulator, value, index, collection);\n };\n }\n return function() {\n return func.apply(context, arguments);\n };\n}\n\n// An internal function to generate callbacks that can be applied to each\n// element in a collection, returning the desired result — either `identity`,\n// an arbitrary callback, a property matcher, or a property accessor.\nfunction baseIteratee(value, context, argCount) {\n if (value == null) return identity;\n if (isFunction(value)) return optimizeCb(value, context, argCount);\n if (isObject(value) && !isArray(value)) return matcher(value);\n return property(value);\n}\n\n// External wrapper for our callback generator. Users may customize\n// `_.iteratee` if they want additional predicate/iteratee shorthand styles.\n// This abstraction hides the internal-only argCount argument.\n_.iteratee = iteratee;\nexport function iteratee(value, context) {\n return baseIteratee(value, context, Infinity);\n}\n\n// The function we actually call internally. It invokes _.iteratee if\n// overridden, otherwise baseIteratee.\nfunction cb(value, context, argCount) {\n if (_.iteratee !== iteratee) return _.iteratee(value, context);\n return baseIteratee(value, context, argCount);\n}\n\n// Some functions take a variable number of arguments, or a few expected\n// arguments at the beginning and then a variable number of values to operate\n// on. This helper accumulates all remaining arguments past the function’s\n// argument length (or an explicit `startIndex`), into an array that becomes\n// the last argument. Similar to ES6’s \"rest parameter\".\nexport function restArguments(func, startIndex) {\n startIndex = startIndex == null ? func.length - 1 : +startIndex;\n return function() {\n var length = Math.max(arguments.length - startIndex, 0),\n rest = Array(length),\n index = 0;\n for (; index < length; index++) {\n rest[index] = arguments[index + startIndex];\n }\n switch (startIndex) {\n case 0: return func.call(this, rest);\n case 1: return func.call(this, arguments[0], rest);\n case 2: return func.call(this, arguments[0], arguments[1], rest);\n }\n var args = Array(startIndex + 1);\n for (index = 0; index < startIndex; index++) {\n args[index] = arguments[index];\n }\n args[startIndex] = rest;\n return func.apply(this, args);\n };\n}\n\n// An internal function for creating a new object that inherits from another.\nfunction baseCreate(prototype) {\n if (!isObject(prototype)) return {};\n if (nativeCreate) return nativeCreate(prototype);\n Ctor.prototype = prototype;\n var result = new Ctor;\n Ctor.prototype = null;\n return result;\n}\n\nfunction shallowProperty(key) {\n return function(obj) {\n return obj == null ? void 0 : obj[key];\n };\n}\n\nfunction _has(obj, path) {\n return obj != null && hasOwnProperty.call(obj, path);\n}\n\nfunction deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n}\n\n// Helper for collection methods to determine whether a collection\n// should be iterated as an array or as an object.\n// Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength\n// Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094\nvar MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;\nvar getLength = shallowProperty('length');\nfunction isArrayLike(collection) {\n var length = getLength(collection);\n return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX;\n}\n\n// Collection Functions\n// --------------------\n\n// The cornerstone, an `each` implementation, aka `forEach`.\n// Handles raw objects in addition to array-likes. Treats all\n// sparse array-likes as if they were dense.\nexport function each(obj, iteratee, context) {\n iteratee = optimizeCb(iteratee, context);\n var i, length;\n if (isArrayLike(obj)) {\n for (i = 0, length = obj.length; i < length; i++) {\n iteratee(obj[i], i, obj);\n }\n } else {\n var _keys = keys(obj);\n for (i = 0, length = _keys.length; i < length; i++) {\n iteratee(obj[_keys[i]], _keys[i], obj);\n }\n }\n return obj;\n}\nexport { each as forEach };\n\n// Return the results of applying the iteratee to each element.\nexport function map(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var _keys = !isArrayLike(obj) && keys(obj),\n length = (_keys || obj).length,\n results = Array(length);\n for (var index = 0; index < length; index++) {\n var currentKey = _keys ? _keys[index] : index;\n results[index] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n}\nexport { map as collect };\n\n// Create a reducing function iterating left or right.\nfunction createReduce(dir) {\n // Wrap code that reassigns argument variables in a separate function than\n // the one that accesses `arguments.length` to avoid a perf hit. (#1991)\n var reducer = function(obj, iteratee, memo, initial) {\n var _keys = !isArrayLike(obj) && keys(obj),\n length = (_keys || obj).length,\n index = dir > 0 ? 0 : length - 1;\n if (!initial) {\n memo = obj[_keys ? _keys[index] : index];\n index += dir;\n }\n for (; index >= 0 && index < length; index += dir) {\n var currentKey = _keys ? _keys[index] : index;\n memo = iteratee(memo, obj[currentKey], currentKey, obj);\n }\n return memo;\n };\n\n return function(obj, iteratee, memo, context) {\n var initial = arguments.length >= 3;\n return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);\n };\n}\n\n// **Reduce** builds up a single result from a list of values, aka `inject`,\n// or `foldl`.\nexport var reduce = createReduce(1);\nexport { reduce as foldl, reduce as inject };\n\n// The right-associative version of reduce, also known as `foldr`.\nexport var reduceRight = createReduce(-1);\nexport { reduceRight as foldr };\n\n// Return the first value which passes a truth test.\nexport function find(obj, predicate, context) {\n var keyFinder = isArrayLike(obj) ? findIndex : findKey;\n var key = keyFinder(obj, predicate, context);\n if (key !== void 0 && key !== -1) return obj[key];\n}\nexport { find as detect };\n\n// Return all the elements that pass a truth test.\nexport function filter(obj, predicate, context) {\n var results = [];\n predicate = cb(predicate, context);\n each(obj, function(value, index, list) {\n if (predicate(value, index, list)) results.push(value);\n });\n return results;\n}\nexport { filter as select };\n\n// Return all the elements for which a truth test fails.\nexport function reject(obj, predicate, context) {\n return filter(obj, negate(cb(predicate)), context);\n}\n\n// Determine whether all of the elements match a truth test.\nexport function every(obj, predicate, context) {\n predicate = cb(predicate, context);\n var _keys = !isArrayLike(obj) && keys(obj),\n length = (_keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = _keys ? _keys[index] : index;\n if (!predicate(obj[currentKey], currentKey, obj)) return false;\n }\n return true;\n}\nexport { every as all };\n\n// Determine if at least one element in the object matches a truth test.\nexport function some(obj, predicate, context) {\n predicate = cb(predicate, context);\n var _keys = !isArrayLike(obj) && keys(obj),\n length = (_keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = _keys ? _keys[index] : index;\n if (predicate(obj[currentKey], currentKey, obj)) return true;\n }\n return false;\n}\nexport { some as any };\n\n// Determine if the array or object contains a given item (using `===`).\nexport function contains(obj, item, fromIndex, guard) {\n if (!isArrayLike(obj)) obj = values(obj);\n if (typeof fromIndex != 'number' || guard) fromIndex = 0;\n return indexOf(obj, item, fromIndex) >= 0;\n}\nexport { contains as includes, contains as include };\n\n// Invoke a method (with arguments) on every item in a collection.\nexport var invoke = restArguments(function(obj, path, args) {\n var contextPath, func;\n if (isFunction(path)) {\n func = path;\n } else if (isArray(path)) {\n contextPath = path.slice(0, -1);\n path = path[path.length - 1];\n }\n return map(obj, function(context) {\n var method = func;\n if (!method) {\n if (contextPath && contextPath.length) {\n context = deepGet(context, contextPath);\n }\n if (context == null) return void 0;\n method = context[path];\n }\n return method == null ? method : method.apply(context, args);\n });\n});\n\n// Convenience version of a common use case of `map`: fetching a property.\nexport function pluck(obj, key) {\n return map(obj, property(key));\n}\n\n// Convenience version of a common use case of `filter`: selecting only objects\n// containing specific `key:value` pairs.\nexport function where(obj, attrs) {\n return filter(obj, matcher(attrs));\n}\n\n// Convenience version of a common use case of `find`: getting the first object\n// containing specific `key:value` pairs.\nexport function findWhere(obj, attrs) {\n return find(obj, matcher(attrs));\n}\n\n// Return the maximum element (or element-based computation).\nexport function max(obj, iteratee, context) {\n var result = -Infinity, lastComputed = -Infinity,\n value, computed;\n if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {\n obj = isArrayLike(obj) ? obj : values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value > result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed > lastComputed || computed === -Infinity && result === -Infinity) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n}\n\n// Return the minimum element (or element-based computation).\nexport function min(obj, iteratee, context) {\n var result = Infinity, lastComputed = Infinity,\n value, computed;\n if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {\n obj = isArrayLike(obj) ? obj : values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value < result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed < lastComputed || computed === Infinity && result === Infinity) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n}\n\n// Shuffle a collection.\nexport function shuffle(obj) {\n return sample(obj, Infinity);\n}\n\n// Sample **n** random values from a collection using the modern version of the\n// [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle).\n// If **n** is not specified, returns a single random element.\n// The internal `guard` argument allows it to work with `map`.\nexport function sample(obj, n, guard) {\n if (n == null || guard) {\n if (!isArrayLike(obj)) obj = values(obj);\n return obj[random(obj.length - 1)];\n }\n var sample = isArrayLike(obj) ? clone(obj) : values(obj);\n var length = getLength(sample);\n n = Math.max(Math.min(n, length), 0);\n var last = length - 1;\n for (var index = 0; index < n; index++) {\n var rand = random(index, last);\n var temp = sample[index];\n sample[index] = sample[rand];\n sample[rand] = temp;\n }\n return sample.slice(0, n);\n}\n\n// Sort the object's values by a criterion produced by an iteratee.\nexport function sortBy(obj, iteratee, context) {\n var index = 0;\n iteratee = cb(iteratee, context);\n return pluck(map(obj, function(value, key, list) {\n return {\n value: value,\n index: index++,\n criteria: iteratee(value, key, list)\n };\n }).sort(function(left, right) {\n var a = left.criteria;\n var b = right.criteria;\n if (a !== b) {\n if (a > b || a === void 0) return 1;\n if (a < b || b === void 0) return -1;\n }\n return left.index - right.index;\n }), 'value');\n}\n\n// An internal function used for aggregate \"group by\" operations.\nfunction group(behavior, partition) {\n return function(obj, iteratee, context) {\n var result = partition ? [[], []] : {};\n iteratee = cb(iteratee, context);\n each(obj, function(value, index) {\n var key = iteratee(value, index, obj);\n behavior(result, value, key);\n });\n return result;\n };\n}\n\n// Groups the object's values by a criterion. Pass either a string attribute\n// to group by, or a function that returns the criterion.\nexport var groupBy = group(function(result, value, key) {\n if (_has(result, key)) result[key].push(value); else result[key] = [value];\n});\n\n// Indexes the object's values by a criterion, similar to `groupBy`, but for\n// when you know that your index values will be unique.\nexport var indexBy = group(function(result, value, key) {\n result[key] = value;\n});\n\n// Counts instances of an object that group by a certain criterion. Pass\n// either a string attribute to count by, or a function that returns the\n// criterion.\nexport var countBy = group(function(result, value, key) {\n if (_has(result, key)) result[key]++; else result[key] = 1;\n});\n\nvar reStrSymbol = /[^\\ud800-\\udfff]|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff]/g;\n// Safely create a real, live array from anything iterable.\nexport function toArray(obj) {\n if (!obj) return [];\n if (isArray(obj)) return slice.call(obj);\n if (isString(obj)) {\n // Keep surrogate pair characters together\n return obj.match(reStrSymbol);\n }\n if (isArrayLike(obj)) return map(obj, identity);\n return values(obj);\n}\n\n// Return the number of elements in an object.\nexport function size(obj) {\n if (obj == null) return 0;\n return isArrayLike(obj) ? obj.length : keys(obj).length;\n}\n\n// Split a collection into two arrays: one whose elements all satisfy the given\n// predicate, and one whose elements all do not satisfy the predicate.\nexport var partition = group(function(result, value, pass) {\n result[pass ? 0 : 1].push(value);\n}, true);\n\n// Array Functions\n// ---------------\n\n// Get the first element of an array. Passing **n** will return the first N\n// values in the array. The **guard** check allows it to work with `map`.\nexport function first(array, n, guard) {\n if (array == null || array.length < 1) return n == null ? void 0 : [];\n if (n == null || guard) return array[0];\n return initial(array, array.length - n);\n}\nexport { first as head, first as take };\n\n// Returns everything but the last entry of the array. Especially useful on\n// the arguments object. Passing **n** will return all the values in\n// the array, excluding the last N.\nexport function initial(array, n, guard) {\n return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));\n}\n\n// Get the last element of an array. Passing **n** will return the last N\n// values in the array.\nexport function last(array, n, guard) {\n if (array == null || array.length < 1) return n == null ? void 0 : [];\n if (n == null || guard) return array[array.length - 1];\n return rest(array, Math.max(0, array.length - n));\n}\n\n// Returns everything but the first entry of the array. Especially useful on\n// the arguments object. Passing an **n** will return the rest N values in the\n// array.\nexport function rest(array, n, guard) {\n return slice.call(array, n == null || guard ? 1 : n);\n}\nexport { rest as tail, rest as drop };\n\n// Trim out all falsy values from an array.\nexport function compact(array) {\n return filter(array, Boolean);\n}\n\n// Internal implementation of a recursive `flatten` function.\nfunction _flatten(input, shallow, strict, output) {\n output = output || [];\n var idx = output.length;\n for (var i = 0, length = getLength(input); i < length; i++) {\n var value = input[i];\n if (isArrayLike(value) && (isArray(value) || isArguments(value))) {\n // Flatten current level of array or arguments object.\n if (shallow) {\n var j = 0, len = value.length;\n while (j < len) output[idx++] = value[j++];\n } else {\n _flatten(value, shallow, strict, output);\n idx = output.length;\n }\n } else if (!strict) {\n output[idx++] = value;\n }\n }\n return output;\n}\n\n// Flatten out an array, either recursively (by default), or just one level.\nexport function flatten(array, shallow) {\n return _flatten(array, shallow, false);\n}\n\n// Return a version of the array that does not contain the specified value(s).\nexport var without = restArguments(function(array, otherArrays) {\n return difference(array, otherArrays);\n});\n\n// Produce a duplicate-free version of the array. If the array has already\n// been sorted, you have the option of using a faster algorithm.\n// The faster algorithm will not work with an iteratee if the iteratee\n// is not a one-to-one function, so providing an iteratee will disable\n// the faster algorithm.\nexport function uniq(array, isSorted, iteratee, context) {\n if (!isBoolean(isSorted)) {\n context = iteratee;\n iteratee = isSorted;\n isSorted = false;\n }\n if (iteratee != null) iteratee = cb(iteratee, context);\n var result = [];\n var seen = [];\n for (var i = 0, length = getLength(array); i < length; i++) {\n var value = array[i],\n computed = iteratee ? iteratee(value, i, array) : value;\n if (isSorted && !iteratee) {\n if (!i || seen !== computed) result.push(value);\n seen = computed;\n } else if (iteratee) {\n if (!contains(seen, computed)) {\n seen.push(computed);\n result.push(value);\n }\n } else if (!contains(result, value)) {\n result.push(value);\n }\n }\n return result;\n}\nexport { uniq as unique };\n\n// Produce an array that contains the union: each distinct element from all of\n// the passed-in arrays.\nexport var union = restArguments(function(arrays) {\n return uniq(_flatten(arrays, true, true));\n});\n\n// Produce an array that contains every item shared between all the\n// passed-in arrays.\nexport function intersection(array) {\n var result = [];\n var argsLength = arguments.length;\n for (var i = 0, length = getLength(array); i < length; i++) {\n var item = array[i];\n if (contains(result, item)) continue;\n var j;\n for (j = 1; j < argsLength; j++) {\n if (!contains(arguments[j], item)) break;\n }\n if (j === argsLength) result.push(item);\n }\n return result;\n}\n\n// Take the difference between one array and a number of other arrays.\n// Only the elements present in just the first array will remain.\nexport var difference = restArguments(function(array, rest) {\n rest = _flatten(rest, true, true);\n return filter(array, function(value){\n return !contains(rest, value);\n });\n});\n\n// Complement of zip. Unzip accepts an array of arrays and groups\n// each array's elements on shared indices.\nexport function unzip(array) {\n var length = array && max(array, getLength).length || 0;\n var result = Array(length);\n\n for (var index = 0; index < length; index++) {\n result[index] = pluck(array, index);\n }\n return result;\n}\n\n// Zip together multiple lists into a single array -- elements that share\n// an index go together.\nexport var zip = restArguments(unzip);\n\n// Converts lists into objects. Pass either a single array of `[key, value]`\n// pairs, or two parallel arrays of the same length -- one of keys, and one of\n// the corresponding values. Passing by pairs is the reverse of pairs.\nexport function object(list, values) {\n var result = {};\n for (var i = 0, length = getLength(list); i < length; i++) {\n if (values) {\n result[list[i]] = values[i];\n } else {\n result[list[i][0]] = list[i][1];\n }\n }\n return result;\n}\n\n// Generator function to create the findIndex and findLastIndex functions.\nfunction createPredicateIndexFinder(dir) {\n return function(array, predicate, context) {\n predicate = cb(predicate, context);\n var length = getLength(array);\n var index = dir > 0 ? 0 : length - 1;\n for (; index >= 0 && index < length; index += dir) {\n if (predicate(array[index], index, array)) return index;\n }\n return -1;\n };\n}\n\n// Returns the first index on an array-like that passes a predicate test.\nexport var findIndex = createPredicateIndexFinder(1);\nexport var findLastIndex = createPredicateIndexFinder(-1);\n\n// Use a comparator function to figure out the smallest index at which\n// an object should be inserted so as to maintain order. Uses binary search.\nexport function sortedIndex(array, obj, iteratee, context) {\n iteratee = cb(iteratee, context, 1);\n var value = iteratee(obj);\n var low = 0, high = getLength(array);\n while (low < high) {\n var mid = Math.floor((low + high) / 2);\n if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;\n }\n return low;\n}\n\n// Generator function to create the indexOf and lastIndexOf functions.\nfunction createIndexFinder(dir, predicateFind, sortedIndex) {\n return function(array, item, idx) {\n var i = 0, length = getLength(array);\n if (typeof idx == 'number') {\n if (dir > 0) {\n i = idx >= 0 ? idx : Math.max(idx + length, i);\n } else {\n length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;\n }\n } else if (sortedIndex && idx && length) {\n idx = sortedIndex(array, item);\n return array[idx] === item ? idx : -1;\n }\n if (item !== item) {\n idx = predicateFind(slice.call(array, i, length), isNaN);\n return idx >= 0 ? idx + i : -1;\n }\n for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {\n if (array[idx] === item) return idx;\n }\n return -1;\n };\n}\n\n// Return the position of the first occurrence of an item in an array,\n// or -1 if the item is not included in the array.\n// If the array is large and already in sort order, pass `true`\n// for **isSorted** to use binary search.\nexport var indexOf = createIndexFinder(1, findIndex, sortedIndex);\nexport var lastIndexOf = createIndexFinder(-1, findLastIndex);\n\n// Generate an integer Array containing an arithmetic progression. A port of\n// the native Python `range()` function. See\n// [the Python documentation](https://docs.python.org/library/functions.html#range).\nexport function range(start, stop, step) {\n if (stop == null) {\n stop = start || 0;\n start = 0;\n }\n if (!step) {\n step = stop < start ? -1 : 1;\n }\n\n var length = Math.max(Math.ceil((stop - start) / step), 0);\n var range = Array(length);\n\n for (var idx = 0; idx < length; idx++, start += step) {\n range[idx] = start;\n }\n\n return range;\n}\n\n// Chunk a single array into multiple arrays, each containing `count` or fewer\n// items.\nexport function chunk(array, count) {\n if (count == null || count < 1) return [];\n var result = [];\n var i = 0, length = array.length;\n while (i < length) {\n result.push(slice.call(array, i, i += count));\n }\n return result;\n}\n\n// Function (ahem) Functions\n// ------------------\n\n// Determines whether to execute a function as a constructor\n// or a normal function with the provided arguments.\nfunction executeBound(sourceFunc, boundFunc, context, callingContext, args) {\n if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);\n var self = baseCreate(sourceFunc.prototype);\n var result = sourceFunc.apply(self, args);\n if (isObject(result)) return result;\n return self;\n}\n\n// Create a function bound to a given object (assigning `this`, and arguments,\n// optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if\n// available.\nexport var bind = restArguments(function(func, context, args) {\n if (!isFunction(func)) throw new TypeError('Bind must be called on a function');\n var bound = restArguments(function(callArgs) {\n return executeBound(func, bound, context, this, args.concat(callArgs));\n });\n return bound;\n});\n\n// Partially apply a function by creating a version that has had some of its\n// arguments pre-filled, without changing its dynamic `this` context. _ acts\n// as a placeholder by default, allowing any combination of arguments to be\n// pre-filled. Set `partial.placeholder` for a custom placeholder argument.\nexport var partial = restArguments(function(func, boundArgs) {\n var placeholder = partial.placeholder;\n var bound = function() {\n var position = 0, length = boundArgs.length;\n var args = Array(length);\n for (var i = 0; i < length; i++) {\n args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];\n }\n while (position < arguments.length) args.push(arguments[position++]);\n return executeBound(func, bound, this, this, args);\n };\n return bound;\n});\n\npartial.placeholder = _;\n\n// Bind a number of an object's methods to that object. Remaining arguments\n// are the method names to be bound. Useful for ensuring that all callbacks\n// defined on an object belong to it.\nexport var bindAll = restArguments(function(obj, _keys) {\n _keys = _flatten(_keys, false, false);\n var index = _keys.length;\n if (index < 1) throw new Error('bindAll must be passed function names');\n while (index--) {\n var key = _keys[index];\n obj[key] = bind(obj[key], obj);\n }\n});\n\n// Memoize an expensive function by storing its results.\nexport function memoize(func, hasher) {\n var memoize = function(key) {\n var cache = memoize.cache;\n var address = '' + (hasher ? hasher.apply(this, arguments) : key);\n if (!_has(cache, address)) cache[address] = func.apply(this, arguments);\n return cache[address];\n };\n memoize.cache = {};\n return memoize;\n}\n\n// Delays a function for the given number of milliseconds, and then calls\n// it with the arguments supplied.\nexport var delay = restArguments(function(func, wait, args) {\n return setTimeout(function() {\n return func.apply(null, args);\n }, wait);\n});\n\n// Defers a function, scheduling it to run after the current call stack has\n// cleared.\nexport var defer = partial(delay, _, 1);\n\n// Returns a function, that, when invoked, will only be triggered at most once\n// during a given window of time. Normally, the throttled function will run\n// as much as it can, without ever going more than once per `wait` duration;\n// but if you'd like to disable the execution on the leading edge, pass\n// `{leading: false}`. To disable execution on the trailing edge, ditto.\nexport function throttle(func, wait, options) {\n var timeout, context, args, result;\n var previous = 0;\n if (!options) options = {};\n\n var later = function() {\n previous = options.leading === false ? 0 : now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n\n var throttled = function() {\n var _now = now();\n if (!previous && options.leading === false) previous = _now;\n var remaining = wait - (_now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = _now;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n\n throttled.cancel = function() {\n clearTimeout(timeout);\n previous = 0;\n timeout = context = args = null;\n };\n\n return throttled;\n}\n\n// Returns a function, that, as long as it continues to be invoked, will not\n// be triggered. The function will be called after it stops being called for\n// N milliseconds. If `immediate` is passed, trigger the function on the\n// leading edge, instead of the trailing.\nexport function debounce(func, wait, immediate) {\n var timeout, result;\n\n var later = function(context, args) {\n timeout = null;\n if (args) result = func.apply(context, args);\n };\n\n var debounced = restArguments(function(args) {\n if (timeout) clearTimeout(timeout);\n if (immediate) {\n var callNow = !timeout;\n timeout = setTimeout(later, wait);\n if (callNow) result = func.apply(this, args);\n } else {\n timeout = delay(later, wait, this, args);\n }\n\n return result;\n });\n\n debounced.cancel = function() {\n clearTimeout(timeout);\n timeout = null;\n };\n\n return debounced;\n}\n\n// Returns the first function passed as an argument to the second,\n// allowing you to adjust arguments, run code before and after, and\n// conditionally execute the original function.\nexport function wrap(func, wrapper) {\n return partial(wrapper, func);\n}\n\n// Returns a negated version of the passed-in predicate.\nexport function negate(predicate) {\n return function() {\n return !predicate.apply(this, arguments);\n };\n}\n\n// Returns a function that is the composition of a list of functions, each\n// consuming the return value of the function that follows.\nexport function compose() {\n var args = arguments;\n var start = args.length - 1;\n return function() {\n var i = start;\n var result = args[start].apply(this, arguments);\n while (i--) result = args[i].call(this, result);\n return result;\n };\n}\n\n// Returns a function that will only be executed on and after the Nth call.\nexport function after(times, func) {\n return function() {\n if (--times < 1) {\n return func.apply(this, arguments);\n }\n };\n}\n\n// Returns a function that will only be executed up to (but not including) the Nth call.\nexport function before(times, func) {\n var memo;\n return function() {\n if (--times > 0) {\n memo = func.apply(this, arguments);\n }\n if (times <= 1) func = null;\n return memo;\n };\n}\n\n// Returns a function that will be executed at most one time, no matter how\n// often you call it. Useful for lazy initialization.\nexport var once = partial(before, 2);\n\n// Object Functions\n// ----------------\n\n// Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.\nvar hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');\nvar nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',\n 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n\nfunction collectNonEnumProps(obj, _keys) {\n var nonEnumIdx = nonEnumerableProps.length;\n var constructor = obj.constructor;\n var proto = isFunction(constructor) && constructor.prototype || ObjProto;\n\n // Constructor is a special case.\n var prop = 'constructor';\n if (_has(obj, prop) && !contains(_keys, prop)) _keys.push(prop);\n\n while (nonEnumIdx--) {\n prop = nonEnumerableProps[nonEnumIdx];\n if (prop in obj && obj[prop] !== proto[prop] && !contains(_keys, prop)) {\n _keys.push(prop);\n }\n }\n}\n\n// Retrieve the names of an object's own properties.\n// Delegates to **ECMAScript 5**'s native `Object.keys`.\nexport function keys(obj) {\n if (!isObject(obj)) return [];\n if (nativeKeys) return nativeKeys(obj);\n var _keys = [];\n for (var key in obj) if (_has(obj, key)) _keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, _keys);\n return _keys;\n}\n\n// Retrieve all the property names of an object.\nexport function allKeys(obj) {\n if (!isObject(obj)) return [];\n var _keys = [];\n for (var key in obj) _keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, _keys);\n return _keys;\n}\n\n// Retrieve the values of an object's properties.\nexport function values(obj) {\n var _keys = keys(obj);\n var length = _keys.length;\n var values = Array(length);\n for (var i = 0; i < length; i++) {\n values[i] = obj[_keys[i]];\n }\n return values;\n}\n\n// Returns the results of applying the iteratee to each element of the object.\n// In contrast to map it returns an object.\nexport function mapObject(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var _keys = keys(obj),\n length = _keys.length,\n results = {};\n for (var index = 0; index < length; index++) {\n var currentKey = _keys[index];\n results[currentKey] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n}\n\n// Convert an object into a list of `[key, value]` pairs.\n// The opposite of object.\nexport function pairs(obj) {\n var _keys = keys(obj);\n var length = _keys.length;\n var pairs = Array(length);\n for (var i = 0; i < length; i++) {\n pairs[i] = [_keys[i], obj[_keys[i]]];\n }\n return pairs;\n}\n\n// Invert the keys and values of an object. The values must be serializable.\nexport function invert(obj) {\n var result = {};\n var _keys = keys(obj);\n for (var i = 0, length = _keys.length; i < length; i++) {\n result[obj[_keys[i]]] = _keys[i];\n }\n return result;\n}\n\n// Return a sorted list of the function names available on the object.\nexport function functions(obj) {\n var names = [];\n for (var key in obj) {\n if (isFunction(obj[key])) names.push(key);\n }\n return names.sort();\n}\nexport { functions as methods };\n\n// An internal function for creating assigner functions.\nfunction createAssigner(keysFunc, defaults) {\n return function(obj) {\n var length = arguments.length;\n if (defaults) obj = Object(obj);\n if (length < 2 || obj == null) return obj;\n for (var index = 1; index < length; index++) {\n var source = arguments[index],\n _keys = keysFunc(source),\n l = _keys.length;\n for (var i = 0; i < l; i++) {\n var key = _keys[i];\n if (!defaults || obj[key] === void 0) obj[key] = source[key];\n }\n }\n return obj;\n };\n}\n\n// Extend a given object with all the properties in passed-in object(s).\nexport var extend = createAssigner(allKeys);\n\n// Assigns a given object with all the own properties in the passed-in object(s).\n// (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)\nexport var extendOwn = createAssigner(keys);\nexport { extendOwn as assign };\n\n// Returns the first key on an object that passes a predicate test.\nexport function findKey(obj, predicate, context) {\n predicate = cb(predicate, context);\n var _keys = keys(obj), key;\n for (var i = 0, length = _keys.length; i < length; i++) {\n key = _keys[i];\n if (predicate(obj[key], key, obj)) return key;\n }\n}\n\n// Internal pick helper function to determine if `obj` has key `key`.\nfunction keyInObj(value, key, obj) {\n return key in obj;\n}\n\n// Return a copy of the object only containing the whitelisted properties.\nexport var pick = restArguments(function(obj, _keys) {\n var result = {}, iteratee = _keys[0];\n if (obj == null) return result;\n if (isFunction(iteratee)) {\n if (_keys.length > 1) iteratee = optimizeCb(iteratee, _keys[1]);\n _keys = allKeys(obj);\n } else {\n iteratee = keyInObj;\n _keys = _flatten(_keys, false, false);\n obj = Object(obj);\n }\n for (var i = 0, length = _keys.length; i < length; i++) {\n var key = _keys[i];\n var value = obj[key];\n if (iteratee(value, key, obj)) result[key] = value;\n }\n return result;\n});\n\n// Return a copy of the object without the blacklisted properties.\nexport var omit = restArguments(function(obj, _keys) {\n var iteratee = _keys[0], context;\n if (isFunction(iteratee)) {\n iteratee = negate(iteratee);\n if (_keys.length > 1) context = _keys[1];\n } else {\n _keys = map(_flatten(_keys, false, false), String);\n iteratee = function(value, key) {\n return !contains(_keys, key);\n };\n }\n return pick(obj, iteratee, context);\n});\n\n// Fill in a given object with default properties.\nexport var defaults = createAssigner(allKeys, true);\n\n// Creates an object that inherits from the given prototype object.\n// If additional properties are provided then they will be added to the\n// created object.\nexport function create(prototype, props) {\n var result = baseCreate(prototype);\n if (props) extendOwn(result, props);\n return result;\n}\n\n// Create a (shallow-cloned) duplicate of an object.\nexport function clone(obj) {\n if (!isObject(obj)) return obj;\n return isArray(obj) ? obj.slice() : extend({}, obj);\n}\n\n// Invokes interceptor with the obj, and then returns obj.\n// The primary purpose of this method is to \"tap into\" a method chain, in\n// order to perform operations on intermediate results within the chain.\nexport function tap(obj, interceptor) {\n interceptor(obj);\n return obj;\n}\n\n// Returns whether an object has a given set of `key:value` pairs.\nexport function isMatch(object, attrs) {\n var _keys = keys(attrs), length = _keys.length;\n if (object == null) return !length;\n var obj = Object(object);\n for (var i = 0; i < length; i++) {\n var key = _keys[i];\n if (attrs[key] !== obj[key] || !(key in obj)) return false;\n }\n return true;\n}\n\n\n// Internal recursive comparison function for `isEqual`.\nfunction eq(a, b, aStack, bStack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal).\n if (a === b) return a !== 0 || 1 / a === 1 / b;\n // `null` or `undefined` only equal to itself (strict comparison).\n if (a == null || b == null) return false;\n // `NaN`s are equivalent, but non-reflexive.\n if (a !== a) return b !== b;\n // Exhaust primitive checks\n var type = typeof a;\n if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;\n return deepEq(a, b, aStack, bStack);\n}\n\n// Internal recursive comparison function for `isEqual`.\nfunction deepEq(a, b, aStack, bStack) {\n // Unwrap any wrapped objects.\n if (a instanceof _) a = a._wrapped;\n if (b instanceof _) b = b._wrapped;\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className !== toString.call(b)) return false;\n switch (className) {\n // Strings, numbers, regular expressions, dates, and booleans are compared by value.\n case '[object RegExp]':\n // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return '' + a === '' + b;\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive.\n // Object(NaN) is equivalent to NaN.\n if (+a !== +a) return +b !== +b;\n // An `egal` comparison is performed for other numeric values.\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a === +b;\n case '[object Symbol]':\n return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);\n }\n\n var areArrays = className === '[object Array]';\n if (!areArrays) {\n if (typeof a != 'object' || typeof b != 'object') return false;\n\n // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n // from different frames are.\n var aCtor = a.constructor, bCtor = b.constructor;\n if (aCtor !== bCtor && !(isFunction(aCtor) && aCtor instanceof aCtor &&\n isFunction(bCtor) && bCtor instanceof bCtor)\n && ('constructor' in a && 'constructor' in b)) {\n return false;\n }\n }\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n\n // Initializing stack of traversed objects.\n // It's done here since we only need them for objects and arrays comparison.\n aStack = aStack || [];\n bStack = bStack || [];\n var length = aStack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (aStack[length] === a) return bStack[length] === b;\n }\n\n // Add the first object to the stack of traversed objects.\n aStack.push(a);\n bStack.push(b);\n\n // Recursively compare objects and arrays.\n if (areArrays) {\n // Compare array lengths to determine if a deep comparison is necessary.\n length = a.length;\n if (length !== b.length) return false;\n // Deep compare the contents, ignoring non-numeric properties.\n while (length--) {\n if (!eq(a[length], b[length], aStack, bStack)) return false;\n }\n } else {\n // Deep compare objects.\n var _keys = keys(a), key;\n length = _keys.length;\n // Ensure that both objects contain the same number of properties before comparing deep equality.\n if (keys(b).length !== length) return false;\n while (length--) {\n // Deep compare each member\n key = _keys[length];\n if (!(_has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;\n }\n }\n // Remove the first object from the stack of traversed objects.\n aStack.pop();\n bStack.pop();\n return true;\n}\n\n// Perform a deep comparison to check if two objects are equal.\nexport function isEqual(a, b) {\n return eq(a, b);\n}\n\n// Is a given array, string, or object empty?\n// An \"empty\" object has no enumerable own-properties.\nexport function isEmpty(obj) {\n if (obj == null) return true;\n if (isArrayLike(obj) && (isArray(obj) || isString(obj) || isArguments(obj))) return obj.length === 0;\n return keys(obj).length === 0;\n}\n\n// Is a given value a DOM element?\nexport function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n}\n\n// Internal function for creating a toString-based type tester.\nfunction tagTester(name) {\n return function(obj) {\n return toString.call(obj) === '[object ' + name + ']';\n };\n}\n\n// Is a given value an array?\n// Delegates to ECMA5's native Array.isArray\nexport var isArray = nativeIsArray || tagTester('Array');\n\n// Is a given variable an object?\nexport function isObject(obj) {\n var type = typeof obj;\n return type === 'function' || type === 'object' && !!obj;\n}\n\n// Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError, isMap, isWeakMap, isSet, isWeakSet.\nexport var isArguments = tagTester('Arguments');\nexport var isFunction = tagTester('Function');\nexport var isString = tagTester('String');\nexport var isNumber = tagTester('Number');\nexport var isDate = tagTester('Date');\nexport var isRegExp = tagTester('RegExp');\nexport var isError = tagTester('Error');\nexport var isSymbol = tagTester('Symbol');\nexport var isMap = tagTester('Map');\nexport var isWeakMap = tagTester('WeakMap');\nexport var isSet = tagTester('Set');\nexport var isWeakSet = tagTester('WeakSet');\n\n// Define a fallback version of the method in browsers (ahem, IE < 9), where\n// there isn't any inspectable \"Arguments\" type.\n(function() {\n if (!isArguments(arguments)) {\n isArguments = function(obj) {\n return _has(obj, 'callee');\n };\n }\n}());\n\n// Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8,\n// IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).\nvar nodelist = root.document && root.document.childNodes;\nif (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {\n isFunction = function(obj) {\n return typeof obj == 'function' || false;\n };\n}\n\n// Is a given object a finite number?\nexport function isFinite(obj) {\n return !isSymbol(obj) && _isFinite(obj) && !_isNaN(parseFloat(obj));\n}\n\n// Is the given value `NaN`?\nexport function isNaN(obj) {\n return isNumber(obj) && _isNaN(obj);\n}\n\n// Is a given value a boolean?\nexport function isBoolean(obj) {\n return obj === true || obj === false || toString.call(obj) === '[object Boolean]';\n}\n\n// Is a given value equal to null?\nexport function isNull(obj) {\n return obj === null;\n}\n\n// Is a given variable undefined?\nexport function isUndefined(obj) {\n return obj === void 0;\n}\n\n// Shortcut function for checking if an object has a given property directly\n// on itself (in other words, not on a prototype).\nexport function has(obj, path) {\n if (!isArray(path)) {\n return _has(obj, path);\n }\n var length = path.length;\n for (var i = 0; i < length; i++) {\n var key = path[i];\n if (obj == null || !hasOwnProperty.call(obj, key)) {\n return false;\n }\n obj = obj[key];\n }\n return !!length;\n}\n\n// Utility Functions\n// -----------------\n\n// Keep the identity function around for default iteratees.\nexport function identity(value) {\n return value;\n}\n\n// Predicate-generating functions. Often useful outside of Underscore.\nexport function constant(value) {\n return function() {\n return value;\n };\n}\n\nexport function noop(){}\n\n// Creates a function that, when passed an object, will traverse that object’s\n// properties down the given `path`, specified as an array of keys or indexes.\nexport function property(path) {\n if (!isArray(path)) {\n return shallowProperty(path);\n }\n return function(obj) {\n return deepGet(obj, path);\n };\n}\n\n// Generates a function for a given object that returns a given property.\nexport function propertyOf(obj) {\n if (obj == null) {\n return function(){};\n }\n return function(path) {\n return !isArray(path) ? obj[path] : deepGet(obj, path);\n };\n}\n\n// Returns a predicate for checking whether an object has a given set of\n// `key:value` pairs.\nexport function matcher(attrs) {\n attrs = extendOwn({}, attrs);\n return function(obj) {\n return isMatch(obj, attrs);\n };\n}\nexport { matcher as matches };\n\n// Run a function **n** times.\nexport function times(n, iteratee, context) {\n var accum = Array(Math.max(0, n));\n iteratee = optimizeCb(iteratee, context, 1);\n for (var i = 0; i < n; i++) accum[i] = iteratee(i);\n return accum;\n}\n\n// Return a random integer between min and max (inclusive).\nexport function random(min, max) {\n if (max == null) {\n max = min;\n min = 0;\n }\n return min + Math.floor(Math.random() * (max - min + 1));\n}\n\n// A (possibly faster) way to get the current timestamp as an integer.\nexport var now = Date.now || function() {\n return new Date().getTime();\n};\n\n// List of HTML entities for escaping.\nvar escapeMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`'\n};\nvar unescapeMap = invert(escapeMap);\n\n// Functions for escaping and unescaping strings to/from HTML interpolation.\nfunction createEscaper(map) {\n var escaper = function(match) {\n return map[match];\n };\n // Regexes for identifying a key that needs to be escaped.\n var source = '(?:' + keys(map).join('|') + ')';\n var testRegexp = RegExp(source);\n var replaceRegexp = RegExp(source, 'g');\n return function(string) {\n string = string == null ? '' : '' + string;\n return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;\n };\n}\nexport var escape = createEscaper(escapeMap);\nexport var unescape = createEscaper(unescapeMap);\n\n// Traverses the children of `obj` along `path`. If a child is a function, it\n// is invoked with its parent as context. Returns the value of the final\n// child, or `fallback` if any child is undefined.\nexport function result(obj, path, fallback) {\n if (!isArray(path)) path = [path];\n var length = path.length;\n if (!length) {\n return isFunction(fallback) ? fallback.call(obj) : fallback;\n }\n for (var i = 0; i < length; i++) {\n var prop = obj == null ? void 0 : obj[path[i]];\n if (prop === void 0) {\n prop = fallback;\n i = length; // Ensure we don't continue iterating.\n }\n obj = isFunction(prop) ? prop.call(obj) : prop;\n }\n return obj;\n}\n\n// Generate a unique integer id (unique within the entire client session).\n// Useful for temporary DOM ids.\nvar idCounter = 0;\nexport function uniqueId(prefix) {\n var id = ++idCounter + '';\n return prefix ? prefix + id : id;\n}\n\n// By default, Underscore uses ERB-style template delimiters, change the\n// following template settings to use alternative delimiters.\nexport var templateSettings = _.templateSettings = {\n evaluate: /<%([\\s\\S]+?)%>/g,\n interpolate: /<%=([\\s\\S]+?)%>/g,\n escape: /<%-([\\s\\S]+?)%>/g\n};\n\n// When customizing `templateSettings`, if you don't want to define an\n// interpolation, evaluation or escaping regex, we need one that is\n// guaranteed not to match.\nvar noMatch = /(.)^/;\n\n// Certain characters need to be escaped so that they can be put into a\n// string literal.\nvar escapes = {\n \"'\": \"'\",\n '\\\\': '\\\\',\n '\\r': 'r',\n '\\n': 'n',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n};\n\nvar escapeRegExp = /\\\\|'|\\r|\\n|\\u2028|\\u2029/g;\n\nvar escapeChar = function(match) {\n return '\\\\' + escapes[match];\n};\n\n// JavaScript micro-templating, similar to John Resig's implementation.\n// Underscore templating handles arbitrary delimiters, preserves whitespace,\n// and correctly escapes quotes within interpolated code.\n// NB: `oldSettings` only exists for backwards compatibility.\nexport function template(text, settings, oldSettings) {\n if (!settings && oldSettings) settings = oldSettings;\n settings = defaults({}, settings, _.templateSettings);\n\n // Combine delimiters into one regular expression via alternation.\n var matcher = RegExp([\n (settings.escape || noMatch).source,\n (settings.interpolate || noMatch).source,\n (settings.evaluate || noMatch).source\n ].join('|') + '|$', 'g');\n\n // Compile the template source, escaping string literals appropriately.\n var index = 0;\n var source = \"__p+='\";\n text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {\n source += text.slice(index, offset).replace(escapeRegExp, escapeChar);\n index = offset + match.length;\n\n if (escape) {\n source += \"'+\\n((__t=(\" + escape + \"))==null?'':_.escape(__t))+\\n'\";\n } else if (interpolate) {\n source += \"'+\\n((__t=(\" + interpolate + \"))==null?'':__t)+\\n'\";\n } else if (evaluate) {\n source += \"';\\n\" + evaluate + \"\\n__p+='\";\n }\n\n // Adobe VMs need the match returned to produce the correct offset.\n return match;\n });\n source += \"';\\n\";\n\n // If a variable is not specified, place data values in local scope.\n if (!settings.variable) source = 'with(obj||{}){\\n' + source + '}\\n';\n\n source = \"var __t,__p='',__j=Array.prototype.join,\" +\n \"print=function(){__p+=__j.call(arguments,'');};\\n\" +\n source + 'return __p;\\n';\n\n var render;\n try {\n render = new Function(settings.variable || 'obj', '_', source);\n } catch (e) {\n e.source = source;\n throw e;\n }\n\n var template = function(data) {\n return render.call(this, data, _);\n };\n\n // Provide the compiled source as a convenience for precompilation.\n var argument = settings.variable || 'obj';\n template.source = 'function(' + argument + '){\\n' + source + '}';\n\n return template;\n}\n\n// Add a \"chain\" function. Start chaining a wrapped Underscore object.\nexport function chain(obj) {\n var instance = _(obj);\n instance._chain = true;\n return instance;\n}\n\n// OOP\n// ---------------\n// If Underscore is called as a function, it returns a wrapped object that\n// can be used OO-style. This wrapper holds altered versions of all the\n// underscore functions. Wrapped objects may be chained.\n\n// Helper function to continue chaining intermediate results.\nfunction chainResult(instance, obj) {\n return instance._chain ? _(obj).chain() : obj;\n}\n\n// Add your own custom functions to the Underscore object.\nexport function mixin(obj) {\n each(functions(obj), function(name) {\n var func = _[name] = obj[name];\n _.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return chainResult(this, func.apply(_, args));\n };\n });\n return _;\n}\n\n// Add all mutator Array functions to the wrapper.\neach(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n var obj = this._wrapped;\n method.apply(obj, arguments);\n if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0];\n return chainResult(this, obj);\n };\n});\n\n// Add all accessor Array functions to the wrapper.\neach(['concat', 'join', 'slice'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n return chainResult(this, method.apply(this._wrapped, arguments));\n };\n});\n\n// Extracts the result from a wrapped and chained object.\n_.prototype.value = function() {\n return this._wrapped;\n};\n\n// Provide unwrapping proxy for some methods used in engine operations\n// such as arithmetic and JSON stringification.\n_.prototype.valueOf = _.prototype.toJSON = _.prototype.value;\n\n_.prototype.toString = function() {\n return String(this._wrapped);\n};\n","import * as allExports from './index';\nimport { mixin } from './index';\n\n// Add all of the Underscore functions to the wrapper object and return it.\nexport default mix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;;;;;;;;;;;EC1oDF;AACA,qBAAe,KAAK,CAAC,UAAU,CAAC,CAAC;;;;;;;;"}
\ No newline at end of file
From 6d2ef3bcaebac784694c58ffa93c6fff523e7af8 Mon Sep 17 00:00:00 2001
From: Julian Gonggrijp
Date: Sun, 29 Mar 2020 15:18:04 +0200
Subject: [PATCH 037/253] Run the build and doc scripts on prepublishOnly
---
package.json | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/package.json b/package.json
index af8771e1e..0f4d8ba7c 100644
--- a/package.json
+++ b/package.json
@@ -47,7 +47,8 @@
"minify": "uglifyjs underscore.js -c \"evaluate=false\" --comments \"/ .*/\" -m",
"build": "npm run bundle && npm run minify -- --source-map content=underscore.js.map --source-map-url \" \" -o underscore-min.js",
"doc": "cd docs && rollup -c && docco -o . underscore.js",
- "weight": "npm run bundle && npm run minify | gzip-size | pretty-bytes"
+ "weight": "npm run bundle && npm run minify | gzip-size | pretty-bytes",
+ "prepublishOnly": "npm run build && npm run doc"
},
"license": "MIT",
"files": [
From 5187352df08bddecdf48572902722e0f08e1d25e Mon Sep 17 00:00:00 2001
From: Julian Gonggrijp
Date: Sun, 29 Mar 2020 15:32:05 +0200
Subject: [PATCH 038/253] Update the CONTRIBUTING
---
CONTRIBUTING.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 95cbd71b8..b8fb76fd7 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -8,6 +8,6 @@
* Before sending a pull request for a feature, be sure to have [tests](https://underscorejs.org/test/).
-* Use the same coding style as the rest of the [codebase](https://github.com/jashkenas/underscore/blob/master/underscore.js).
+* 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-min.js` file. We'll do those things before cutting a new release.
From 1e4ec34a99cc9c2b8ace7758421c2a3e6a7bea6b Mon Sep 17 00:00:00 2001
From: Julian Gonggrijp
Date: Sun, 29 Mar 2020 18:10:05 +0200
Subject: [PATCH 039/253] Add an empty section to the changelog for the 1.10
release
---
index.html | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/index.html b/index.html
index fe20a9f78..ecdb5f741 100644
--- a/index.html
+++ b/index.html
@@ -2392,6 +2392,11 @@ Links & Suggested Reading
Change Log
+
+ — — Diff — Docs
+
+
+
— Jan 6, 2020 — Diff — Docs
From 255270211da63b2108d74a4a4c0e71b3807ed66c Mon Sep 17 00:00:00 2001
From: Julian Gonggrijp
Date: Sun, 29 Mar 2020 18:10:42 +0200
Subject: [PATCH 040/253] Fix the documentation link of the previous changelog
entry
---
index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/index.html b/index.html
index ecdb5f741..9626f8da0 100644
--- a/index.html
+++ b/index.html
@@ -2398,7 +2398,7 @@ Change Log
- — Jan 6, 2020 — Diff — Docs
+ — Jan 6, 2020 — Diff — Docs
-
No code changes. Updated a test to help out
From 4990d19289e10a008b6fc186240fcbc97c7d05bc Mon Sep 17 00:00:00 2001
From: Julian Gonggrijp
Date: Mon, 30 Mar 2020 00:10:13 +0200
Subject: [PATCH 041/253] Include #2820 in the changelog
---
index.html | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/index.html b/index.html
index 9626f8da0..949708779 100644
--- a/index.html
+++ b/index.html
@@ -2394,7 +2394,14 @@
Change Log
— — Diff — Docs
-
+
+ -
+ Explicitly states in the documentation, and verifies in the
+ unittests, that _.sortedIndex(array, value) always returns
+ the lower bound, i.e., the smallest index, at which value
+ may be inserted in array.
+
+
From c92e961ed53f2f50b1a60efe91449b54d6fca92c Mon Sep 17 00:00:00 2001
From: Julian Gonggrijp
Date: Mon, 30 Mar 2020 00:18:42 +0200
Subject: [PATCH 042/253] Include #2825 in the changelog
---
index.html | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/index.html b/index.html
index 949708779..f81a501f5 100644
--- a/index.html
+++ b/index.html
@@ -2401,6 +2401,10 @@ Change Log
the lower bound, i.e., the smallest index, at which value
may be inserted in array.
+ -
+ Makes the notation of the _.max unittest consistent with
+ other unittests.
+
From 5a4d81fdb3521c5869d980cb59af057e5a542920 Mon Sep 17 00:00:00 2001
From: Julian Gonggrijp
Date: Mon, 30 Mar 2020 00:26:10 +0200
Subject: [PATCH 043/253] Include #2829 in the changelog
---
index.html | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/index.html b/index.html
index f81a501f5..23a4e4dc7 100644
--- a/index.html
+++ b/index.html
@@ -2405,6 +2405,11 @@ Change Log
Makes the notation of the _.max unittest consistent with
other unittests.
+
+ Fixes a bug that would cause infinite recursion if an overridden
+ implementation of _.iteratee attempted to fall back to the
+ original implementation.
+
From 948f3c9166c40adf00b98545d23ef590a4884a30 Mon Sep 17 00:00:00 2001
From: Julian Gonggrijp
Date: Mon, 30 Mar 2020 00:31:53 +0200
Subject: [PATCH 044/253] Include #2831 in the changelog and the installation
section
---
index.html | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/index.html b/index.html
index 23a4e4dc7..4d4944249 100644
--- a/index.html
+++ b/index.html
@@ -478,6 +478,9 @@ Installation
Component component install jashkenas/underscore
+
+ ExtendScript #include "underscore.js"
+
@@ -2410,6 +2413,9 @@
Change Log
implementation of
_.iteratee attempted to fall back to the
original implementation.
+
+ Restores compatibility with EcmaScript 3 and ExtendScript.
+
From 361a3520f55607ec79d7d8d1a610a0c0678a20a9 Mon Sep 17 00:00:00 2001
From: Julian Gonggrijp
Date: Mon, 30 Mar 2020 01:18:42 +0200
Subject: [PATCH 045/253] Include #2826 in the changelog, installation and
noConflict sections
---
index.html | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/index.html b/index.html
index 4d4944249..39f24e195 100644
--- a/index.html
+++ b/index.html
@@ -481,6 +481,12 @@ Installation
ExtendScript #include "underscore.js"
+
+ Rollup If you want to enable treeshaking and you don’t
+ need the full _ object (with all Underscore functions as
+ properties), you can import individual functions by name from
+ underscore/modules/index instead of underscore.
+
@@ -1953,12 +1959,15 @@
Utility Functions
_.noConflict()
- Give control of the _ variable back to its previous owner. Returns
- a reference to the Underscore object.
+ Give control of the global _ variable back to its previous
+ owner. Returns a reference to the Underscore object.
var underscore = _.noConflict();
+
+ The _.noConflict function is not present if you use the EcmaScript 6, AMD or CommonJS module system to import Underscore.
+
_.identity(value)
@@ -2416,6 +2425,13 @@
Change Log
Restores compatibility with EcmaScript 3 and ExtendScript.
+
+ Reformats the source code to use EcmaScript 6 export
+ notation. The underscore.js UMD bundle is now compiled
+ from underlying source modules instead of being the
+ source. From now on, Rollup users have the option to import from
+ the underlying source module in order to enable treeshaking.
+
From d18f67f503aeb19ff11913e1a0728312646f3f7c Mon Sep 17 00:00:00 2001
From: Julian Gonggrijp
Date: Mon, 30 Mar 2020 01:28:24 +0200
Subject: [PATCH 046/253] Mention the removal of Component support
---
index.html | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/index.html b/index.html
index 39f24e195..6040ac22f 100644
--- a/index.html
+++ b/index.html
@@ -475,9 +475,6 @@ Installation
Bower bower install underscore
-
- Component component install jashkenas/underscore
-
ExtendScript #include "underscore.js"
@@ -2487,6 +2484,10 @@ Change Log
Adds support for several environments including: WebWorkers,
browserify and ES6 imports.
+
+ Removes the component.json as the Component package
+ management system is discontinued.
+
The placeholder used for partial is now configurable by setting
_.partial.placeholder.
From e1a5518a144b5431f7ad74e3bcf32e0ed6c4fe78 Mon Sep 17 00:00:00 2001
From: Julian Gonggrijp
Date: Mon, 30 Mar 2020 01:41:19 +0200
Subject: [PATCH 047/253] Bump the version number in the documentation and
source code
---
index.html | 6 +++---
modules/index.js | 4 ++--
underscore.js | 4 ++--
underscore.js.map | 2 +-
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/index.html b/index.html
index 6040ac22f..e872befd4 100644
--- a/index.html
+++ b/index.html
@@ -183,7 +183,7 @@