export var VERSION = '1.12.1';
diff --git a/.gitignore b/.gitignore index 212d21c3a..02922c347 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,7 @@ coverage test-treeshake/*-umd.js amd cjs +/underscore.js +/underscore-min.js +/underscore-min.js.map +/underscore-node-*-pre* diff --git a/.travis.yml b/.travis.yml index 2c4a69973..c7a49f431 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,15 +5,22 @@ sudo: false jobs: include: - node_js: 8 - env: EXTRA=false + env: + - DOWNGRADE=true + - EXTRA=false - node_js: 10 - env: EXTRA=true + env: + - DOWNGRADE=false + - EXTRA=false - node_js: 14 - env: EXTRA=false + env: + - DOWNGRADE=false + - EXTRA=true before_install: - npm install -g karma-cli before_script: - npm install karma-sauce-launcher + - "[ $DOWNGRADE = false ] || npm install rollup@1" script: - npm test - "[ $EXTRA = false ] || npm run test-browser" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 998239813..4d29286a6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,4 +14,4 @@ * 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. +* In your pull request, do not add documentation or re-build the minified `underscore-umd-min.js` file. We'll do those things before cutting a new release. diff --git a/bower.json b/bower.json index d5e1d7852..03260df70 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "underscore", - "main": "underscore.js", + "main": "underscore-umd.js", "keywords": ["util", "functional", "server", "client", "browser"], "ignore" : ["docs", "test", "*.yml", "CNAME", "index.html", "favicon.ico", "CONTRIBUTING.md", ".*", "package.json", "karma.*"] } diff --git a/docs/modules/_setup.html b/docs/modules/_setup.html index 40635f2be..1c8bec683 100644 --- a/docs/modules/_setup.html +++ b/docs/modules/_setup.html @@ -850,7 +850,7 @@
export var VERSION = '1.12.1';
export var VERSION = '1.13.0-3';
Underscore.js 1.12.1
+ Underscore.js 1.13.0-3
https://underscorejs.org
(c) 2009-2020 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
Underscore may be freely distributed under the MIT license.
diff --git a/docs/underscore-esm.html b/docs/underscore-esm.html
index bac66f927..391747eca 100644
--- a/docs/underscore-esm.html
+++ b/docs/underscore-esm.html
@@ -27,7 +27,7 @@ underscore-esm.js
- Underscore.js 1.12.1
+ Underscore.js 1.13.0-3
https://underscorejs.org
(c) 2009-2020 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
Underscore may be freely distributed under the MIT license.
@@ -46,7 +46,7 @@ underscore-esm.js
- var VERSION = '1.12.1';
+ var VERSION = '1.13.0-3';
@@ -443,7 +443,7 @@ underscore-esm.js
- function has(obj, key) {
+ function has$1(obj, key) {
return obj != null && hasOwnProperty.call(obj, key);
}
@@ -466,7 +466,7 @@ underscore-esm.js
(function() {
if (!isArguments(arguments)) {
isArguments = function(obj) {
- return has(obj, 'callee');
+ return has$1(obj, 'callee');
};
}
}());
@@ -710,7 +710,7 @@ underscore-esm.js
var prop = 'constructor';
- if (has(obj, prop) && !keys.contains(prop)) keys.push(prop);
+ if (has$1(obj, prop) && !keys.contains(prop)) keys.push(prop);
while (nonEnumIdx--) {
prop = nonEnumerableProps[nonEnumIdx];
@@ -738,7 +738,7 @@ underscore-esm.js
if (!isObject(obj)) return [];
if (nativeKeys) return nativeKeys(obj);
var keys = [];
- for (var key in obj) if (has(obj, key)) keys.push(key);
+ for (var key in obj) if (has$1(obj, key)) keys.push(key);
@@ -834,13 +834,13 @@ underscore-esm.js
- function _(obj) {
- if (obj instanceof _) return obj;
- if (!(this instanceof _)) return new _(obj);
+ function _$1(obj) {
+ if (obj instanceof _$1) return obj;
+ if (!(this instanceof _$1)) return new _$1(obj);
this._wrapped = obj;
}
-_.VERSION = VERSION;
+_$1.VERSION = VERSION;
@@ -855,7 +855,7 @@ underscore-esm.js
- _.prototype.value = function() {
+ _$1.prototype.value = function() {
return this._wrapped;
};
@@ -873,9 +873,9 @@ underscore-esm.js
- _.prototype.valueOf = _.prototype.toJSON = _.prototype.value;
+ _$1.prototype.valueOf = _$1.prototype.toJSON = _$1.prototype.value;
-_.prototype.toString = function() {
+_$1.prototype.toString = function() {
return String(this._wrapped);
};
@@ -1023,8 +1023,8 @@ underscore-esm.js
- if (a instanceof _) a = a._wrapped;
- if (b instanceof _) b = b._wrapped;
+ if (a instanceof _$1) a = a._wrapped;
+ if (b instanceof _$1) b = b._wrapped;
@@ -1371,7 +1371,7 @@ underscore-esm.js
key = _keys[length];
- if (!(has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
+ if (!(has$1(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
}
}
@@ -1830,10 +1830,10 @@ underscore-esm.js
- function toPath(path) {
+ function toPath$1(path) {
return isArray(path) ? path : [path];
}
-_.toPath = toPath;
+_$1.toPath = toPath$1;
@@ -1849,8 +1849,8 @@ underscore-esm.js
- function toPath$1(path) {
- return _.toPath(path);
+ function toPath(path) {
+ return _$1.toPath(path);
}
@@ -1892,7 +1892,7 @@ underscore-esm.js
function get(object, path, defaultValue) {
- var value = deepGet(object, toPath$1(path));
+ var value = deepGet(object, toPath(path));
return isUndefined(value) ? defaultValue : value;
}
@@ -1911,12 +1911,12 @@ underscore-esm.js
- function has$1(obj, path) {
- path = toPath$1(path);
+ function has(obj, path) {
+ path = toPath(path);
var length = path.length;
for (var i = 0; i < length; i++) {
var key = path[i];
- if (!has(obj, key)) return false;
+ if (!has$1(obj, key)) return false;
obj = obj[key];
}
return !!length;
@@ -1975,7 +1975,7 @@ underscore-esm.js
function property(path) {
- path = toPath$1(path);
+ path = toPath(path);
return function(obj) {
return deepGet(obj, path);
};
@@ -2068,7 +2068,7 @@ underscore-esm.js
function iteratee(value, context) {
return baseIteratee(value, context, Infinity);
}
-_.iteratee = iteratee;
+_$1.iteratee = iteratee;
@@ -2085,7 +2085,7 @@ underscore-esm.js
function cb(value, context, argCount) {
- if (_.iteratee !== iteratee) return _.iteratee(value, context);
+ if (_$1.iteratee !== iteratee) return _$1.iteratee(value, context);
return baseIteratee(value, context, argCount);
}
@@ -2330,7 +2330,7 @@ underscore-esm.js
- var templateSettings = _.templateSettings = {
+ var templateSettings = _$1.templateSettings = {
evaluate: /<%([\s\S]+?)%>/g,
interpolate: /<%=([\s\S]+?)%>/g,
escape: /<%-([\s\S]+?)%>/g
@@ -2419,7 +2419,7 @@ underscore-esm.js
function template(text, settings, oldSettings) {
if (!settings && oldSettings) settings = oldSettings;
- settings = defaults({}, settings, _.templateSettings);
+ settings = defaults({}, settings, _$1.templateSettings);
@@ -2535,7 +2535,7 @@ underscore-esm.js
}
var template = function(data) {
- return render.call(this, data, _);
+ return render.call(this, data, _$1);
};
@@ -2572,7 +2572,7 @@ underscore-esm.js
function result(obj, path, fallback) {
- path = toPath$1(path);
+ path = toPath(path);
var length = path.length;
if (!length) {
return isFunction$1(fallback) ? fallback.call(obj) : fallback;
@@ -2622,7 +2622,7 @@ underscore-esm.js
function chain(obj) {
- var instance = _(obj);
+ var instance = _$1(obj);
instance._chain = true;
return instance;
}
@@ -2680,7 +2680,7 @@ underscore-esm.js
return bound;
});
-partial.placeholder = _;
+partial.placeholder = _$1;
@@ -2735,7 +2735,7 @@ underscore-esm.js
- function flatten(input, depth, strict, output) {
+ function flatten$1(input, depth, strict, output) {
output = output || [];
if (!depth && depth !== 0) {
depth = Infinity;
@@ -2761,7 +2761,7 @@ underscore-esm.js
if (depth > 1) {
- flatten(value, depth - 1, strict, output);
+ flatten$1(value, depth - 1, strict, output);
idx = output.length;
} else {
var j = 0, len = value.length;
@@ -2790,7 +2790,7 @@ underscore-esm.js
var bindAll = restArguments(function(obj, keys) {
- keys = flatten(keys, false, false);
+ keys = flatten$1(keys, false, false);
var index = keys.length;
if (index < 1) throw new Error('bindAll must be passed function names');
while (index--) {
@@ -2817,7 +2817,7 @@ underscore-esm.js
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$1(cache, address)) cache[address] = func.apply(this, arguments);
return cache[address];
};
memoize.cache = {};
@@ -2858,7 +2858,7 @@ underscore-esm.js
- var defer = partial(delay, _, 1);
+ var defer = partial(delay, _$1, 1);
@@ -3578,7 +3578,7 @@ underscore-esm.js
if (isFunction$1(path)) {
func = path;
} else {
- path = toPath$1(path);
+ path = toPath(path);
contextPath = path.slice(0, -1);
path = path[path.length - 1];
}
@@ -3828,7 +3828,7 @@ underscore-esm.js
var groupBy = group(function(result, value, key) {
- if (has(result, key)) result[key].push(value); else result[key] = [value];
+ if (has$1(result, key)) result[key].push(value); else result[key] = [value];
});
@@ -3865,7 +3865,7 @@ underscore-esm.js
var countBy = group(function(result, value, key) {
- if (has(result, key)) result[key]++; else result[key] = 1;
+ if (has$1(result, key)) result[key]++; else result[key] = 1;
});
@@ -3981,7 +3981,7 @@ underscore-esm.js
keys = allKeys(obj);
} else {
iteratee = keyInObj;
- keys = flatten(keys, false, false);
+ keys = flatten$1(keys, false, false);
obj = Object(obj);
}
for (var i = 0, length = keys.length; i < length; i++) {
@@ -4011,7 +4011,7 @@ underscore-esm.js
iteratee = negate(iteratee);
if (keys.length > 1) context = keys[1];
} else {
- keys = map(flatten(keys, false, false), String);
+ keys = map(flatten$1(keys, false, false), String);
iteratee = function(value, key) {
return !contains(keys, key);
};
@@ -4128,8 +4128,8 @@ underscore-esm.js
- function flatten$1(array, depth) {
- return flatten(array, depth, false);
+ function flatten(array, depth) {
+ return flatten$1(array, depth, false);
}
@@ -4147,7 +4147,7 @@ underscore-esm.js
var difference = restArguments(function(array, rest) {
- rest = flatten(rest, true, true);
+ rest = flatten$1(rest, true, true);
return filter(array, function(value){
return !contains(rest, value);
});
@@ -4229,7 +4229,7 @@ underscore-esm.js
var union = restArguments(function(arrays) {
- return uniq(flatten(arrays, true, true));
+ return uniq(flatten$1(arrays, true, true));
});
@@ -4400,7 +4400,7 @@ underscore-esm.js
function chainResult(instance, obj) {
- return instance._chain ? _(obj).chain() : obj;
+ return instance._chain ? _$1(obj).chain() : obj;
}
@@ -4418,14 +4418,14 @@ underscore-esm.js
function mixin(obj) {
each(functions(obj), function(name) {
- var func = _[name] = obj[name];
- _.prototype[name] = function() {
+ var func = _$1[name] = obj[name];
+ _$1.prototype[name] = function() {
var args = [this._wrapped];
push.apply(args, arguments);
- return chainResult(this, func.apply(_, args));
+ return chainResult(this, func.apply(_$1, args));
};
});
- return _;
+ return _$1;
}
@@ -4443,7 +4443,7 @@ underscore-esm.js
each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
var method = ArrayProto[name];
- _.prototype[name] = function() {
+ _$1.prototype[name] = function() {
var obj = this._wrapped;
if (obj != null) {
method.apply(obj, arguments);
@@ -4470,7 +4470,7 @@ underscore-esm.js
each(['concat', 'join', 'slice'], function(name) {
var method = ArrayProto[name];
- _.prototype[name] = function() {
+ _$1.prototype[name] = function() {
var obj = this._wrapped;
if (obj != null) obj = method.apply(obj, arguments);
return chainResult(this, obj);
@@ -4536,12 +4536,12 @@ underscore-esm.js
clone: clone,
tap: tap,
get: get,
- has: has$1,
+ has: has,
mapObject: mapObject,
identity: identity,
constant: constant,
noop: noop,
- toPath: toPath,
+ toPath: toPath$1,
property: property,
propertyOf: propertyOf,
matcher: matcher,
@@ -4624,7 +4624,7 @@ underscore-esm.js
tail: rest,
drop: rest,
compact: compact,
- flatten: flatten$1,
+ flatten: flatten,
without: without,
uniq: uniq,
unique: uniq,
@@ -4638,7 +4638,7 @@ underscore-esm.js
range: range,
chunk: chunk,
mixin: mixin,
- 'default': _
+ 'default': _$1
};
@@ -4667,7 +4667,7 @@ underscore-esm.js
- var _$1 = mixin(allExports);
+ var _ = mixin(allExports);
@@ -4682,7 +4682,7 @@ underscore-esm.js
- _$1._ = _$1;
+ _._ = _;
@@ -4698,8 +4698,8 @@ underscore-esm.js
-export default _$1;
-export { VERSION, after, every as all, allKeys, some as any, extendOwn as assign, before, bind, bindAll, chain, chunk, clone, map as collect, compact, compose, constant, contains, countBy, create, debounce, defaults, defer, delay, find as detect, difference, rest as drop, each, _escape as escape, every, extend, extendOwn, filter, find, findIndex, findKey, findLastIndex, findWhere, first, flatten$1 as flatten, reduce as foldl, reduceRight as foldr, each as forEach, functions, get, groupBy, has$1 as has, first as head, identity, contains as include, contains as includes, indexBy, indexOf, initial, reduce as inject, intersection, invert, invoke, isArguments$1 as isArguments, isArray, isArrayBuffer, isBoolean, isDataView$1 as isDataView, isDate, isElement, isEmpty, isEqual, isError, isFinite$1 as isFinite, isFunction$1 as isFunction, isMap, isMatch, isNaN$1 as isNaN, isNull, isNumber, isObject, isRegExp, isSet, isString, isSymbol, isTypedArray$1 as isTypedArray, isUndefined, isWeakMap, isWeakSet, iteratee, keys, last, lastIndexOf, map, mapObject, matcher, matcher as matches, max, memoize, functions as methods, min, mixin, negate, noop, now, object, omit, once, pairs, partial, partition, pick, pluck, property, propertyOf, random, range, reduce, reduceRight, reject, rest, restArguments, result, sample, filter as select, shuffle, size, some, sortBy, sortedIndex, rest as tail, first as take, tap, template, templateSettings, throttle, times, toArray, toPath, unzip as transpose, _unescape as unescape, union, uniq, uniq as unique, uniqueId, unzip, values, where, without, wrap, zip };
+export default _;
+export { VERSION, after, every as all, allKeys, some as any, extendOwn as assign, before, bind, bindAll, chain, chunk, clone, map as collect, compact, compose, constant, contains, countBy, create, debounce, defaults, defer, delay, find as detect, difference, rest as drop, each, _escape as escape, every, extend, extendOwn, filter, find, findIndex, findKey, findLastIndex, findWhere, first, flatten, reduce as foldl, reduceRight as foldr, each as forEach, functions, get, groupBy, has, first as head, identity, contains as include, contains as includes, indexBy, indexOf, initial, reduce as inject, intersection, invert, invoke, isArguments$1 as isArguments, isArray, isArrayBuffer, isBoolean, isDataView$1 as isDataView, isDate, isElement, isEmpty, isEqual, isError, isFinite$1 as isFinite, isFunction$1 as isFunction, isMap, isMatch, isNaN$1 as isNaN, isNull, isNumber, isObject, isRegExp, isSet, isString, isSymbol, isTypedArray$1 as isTypedArray, isUndefined, isWeakMap, isWeakSet, iteratee, keys, last, lastIndexOf, map, mapObject, matcher, matcher as matches, max, memoize, functions as methods, min, mixin, negate, noop, now, object, omit, once, pairs, partial, partition, pick, pluck, property, propertyOf, random, range, reduce, reduceRight, reject, rest, restArguments, result, sample, filter as select, shuffle, size, some, sortBy, sortedIndex, rest as tail, first as take, tap, template, templateSettings, throttle, times, toArray, toPath$1 as toPath, unzip as transpose, _unescape as unescape, union, uniq, uniq as unique, uniqueId, unzip, values, where, without, wrap, zip };
diff --git a/index.html b/index.html
index c0eecdd73..fa4f7173f 100644
--- a/index.html
+++ b/index.html
@@ -186,7 +186,7 @@
-
+