Skip to content

Commit 2a93247

Browse files
committed
Underscore.js 1.10.2
1 parent db4a359 commit 2a93247

File tree

10 files changed

+61
-22
lines changed

10 files changed

+61
-22
lines changed

docs/underscore.html

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ <h1>underscore.js</h1>
2727
<div class="pilwrap ">
2828
<a class="pilcrow" href="#section-1">&#182;</a>
2929
</div>
30-
<pre><code>Underscore.js <span class="hljs-number">1.10</span><span class="hljs-number">.1</span>
30+
<pre><code>Underscore.js <span class="hljs-number">1.10</span><span class="hljs-number">.2</span>
3131
https:<span class="hljs-comment">//underscorejs.org</span>
3232
(c) <span class="hljs-number">2009</span><span class="hljs-number">-2020</span> Jeremy Ashkenas, DocumentCloud and Investigative Reporters &amp; Editors
3333
Underscore may be freely distributed under the MIT license.
@@ -195,7 +195,7 @@ <h2 id="baseline-setup">Baseline setup</h2>
195195

196196
</div>
197197

198-
<div class="content"><div class='highlight'><pre><span class="hljs-keyword">var</span> VERSION = _.VERSION = <span class="hljs-string">'1.10.1'</span>;</pre></div></div>
198+
<div class="content"><div class='highlight'><pre><span class="hljs-keyword">var</span> VERSION = _.VERSION = <span class="hljs-string">'1.10.2'</span>;</pre></div></div>
199199

200200
</li>
201201

@@ -4137,13 +4137,28 @@ <h2 id="oop">OOP</h2>
41374137
<div class="pilwrap ">
41384138
<a class="pilcrow" href="#section-192">&#182;</a>
41394139
</div>
4140-
<p>Add all of the Underscore functions to the wrapper object and return it.</p>
4140+
<p>Add all of the Underscore functions to the wrapper object.</p>
41414141

41424142
</div>
41434143

4144-
<div class="content"><div class='highlight'><pre><span class="hljs-keyword">var</span> indexDefault = mixin(allExports);
4144+
<div class="content"><div class='highlight'><pre><span class="hljs-keyword">var</span> _$<span class="hljs-number">1</span> = mixin(allExports);</pre></div></div>
4145+
4146+
</li>
4147+
4148+
4149+
<li id="section-193">
4150+
<div class="annotation">
4151+
4152+
<div class="pilwrap ">
4153+
<a class="pilcrow" href="#section-193">&#182;</a>
4154+
</div>
4155+
<p>Legacy Node.js API</p>
4156+
4157+
</div>
4158+
4159+
<div class="content"><div class='highlight'><pre>_$<span class="hljs-number">1.</span>_ = _$<span class="hljs-number">1</span>;
41454160

4146-
<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> indexDefault;
4161+
<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> _$<span class="hljs-number">1</span>;
41474162
<span class="hljs-keyword">export</span> { VERSION, iteratee, restArguments, each, each <span class="hljs-keyword">as</span> forEach, map, map <span class="hljs-keyword">as</span> collect, reduce, reduce <span class="hljs-keyword">as</span> foldl, reduce <span class="hljs-keyword">as</span> inject, reduceRight, reduceRight <span class="hljs-keyword">as</span> foldr, find, find <span class="hljs-keyword">as</span> detect, filter, filter <span class="hljs-keyword">as</span> select, reject, every, every <span class="hljs-keyword">as</span> all, some, some <span class="hljs-keyword">as</span> any, contains, contains <span class="hljs-keyword">as</span> includes, contains <span class="hljs-keyword">as</span> include, invoke, pluck, where, findWhere, max, min, shuffle, sample, sortBy, groupBy, indexBy, countBy, toArray, size, partition, first, first <span class="hljs-keyword">as</span> head, first <span class="hljs-keyword">as</span> take, initial, last, rest, rest <span class="hljs-keyword">as</span> tail, rest <span class="hljs-keyword">as</span> drop, compact, flatten, without, uniq, uniq <span class="hljs-keyword">as</span> unique, union, intersection, difference, unzip, zip, object, findIndex, findLastIndex, sortedIndex, indexOf, lastIndexOf, range, chunk, bind, partial, bindAll, memoize, delay, defer, throttle, debounce, wrap, negate, compose, after, before, once, keys, allKeys, values, mapObject, pairs, invert, functions, functions <span class="hljs-keyword">as</span> methods, extend, extendOwn, extendOwn <span class="hljs-keyword">as</span> assign, findKey, pick, omit, defaults, create, clone, tap, isMatch, isEqual, isEmpty, isElement, isArray, isObject, isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError, isSymbol, isMap, isWeakMap, isSet, isWeakSet, <span class="hljs-built_in">isFinite</span>, <span class="hljs-built_in">isNaN</span>, isBoolean, isNull, isUndefined, has, identity, constant, noop, property, propertyOf, matcher, matcher <span class="hljs-keyword">as</span> matches, times, random, now, <span class="hljs-built_in">escape</span>, <span class="hljs-built_in">unescape</span>, result, uniqueId, templateSettings, template, chain, mixin };</pre></div></div>
41484163

41494164
</li>

index.html

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
<div id="sidebar" class="interface">
187187

188188
<a class="toc_title" href="#">
189-
Underscore.js <span class="version">(1.10.1)</span>
189+
Underscore.js <span class="version">(1.10.2)</span>
190190
</a>
191191
<ul class="toc_section">
192192
<li>&raquo; <a href="https://github.com/jashkenas/underscore">GitHub Repository</a></li>
@@ -440,7 +440,7 @@
440440
<i>Underscore is an open-source component of <a href="https://documentcloud.org/">DocumentCloud</a>.</i>
441441
</p>
442442

443-
<h2>v1.10.1 Downloads <i style="padding-left: 12px; font-size:12px;">(Right-click, and use "Save As")</i></h2>
443+
<h2>v1.10.2 Downloads <i style="padding-left: 12px; font-size:12px;">(Right-click, and use "Save As")</i></h2>
444444

445445
<table>
446446
<tr>
@@ -2417,8 +2417,18 @@ <h2 id="links">Links &amp; Suggested Reading</h2>
24172417

24182418
<h2 id="changelog">Change Log</h2>
24192419

2420+
<p id="1.10.2">
2421+
<b class="header">1.10.2</b> &mdash; <small><i>March 30, 2020</i></small> &mdash; <a href="https://github.com/jashkenas/underscore/compare/1.10.1...1.10.2">Diff</a> &mdash; <a href="https://cdn.rawgit.com/jashkenas/underscore/1.10.2/index.html">Docs</a><br />
2422+
<ul>
2423+
<li>
2424+
Fixes a bug introduced with <tt>1.10.0</tt>, while using the legacy
2425+
Node.js require API: <tt>var _ = require("underscore")._</tt>
2426+
</li>
2427+
</ul>
2428+
</p>
2429+
24202430
<p id="1.10.1">
2421-
<b class="header">1.10.1</b> &mdash; <small><i>March 30, 2020</i></small> &mdash; <a href="https://github.com/jashkenas/underscore/compare/1.10.0...1.10.1">Diff</a> &mdash; <a href="https://cdn.rawgit.com/jashkenas/underscore/1.10.0/index.html">Docs</a><br />
2431+
<b class="header">1.10.1</b> &mdash; <small><i>March 30, 2020</i></small> &mdash; <a href="https://github.com/jashkenas/underscore/compare/1.10.0...1.10.1">Diff</a> &mdash; <a href="https://cdn.rawgit.com/jashkenas/underscore/1.10.1/index.html">Docs</a><br />
24222432
<ul>
24232433
<li>
24242434
Fixed relative links among the ES Modules to include the file

modules/index-default.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import * as allExports from './index.js';
22
import { mixin } from './index.js';
33

4-
// Add all of the Underscore functions to the wrapper object and return it.
5-
export default mixin(allExports);
4+
// Add all of the Underscore functions to the wrapper object.
5+
var _ = mixin(allExports);
6+
// Legacy Node.js API
7+
_._ = _;
8+
// Export the Underscore API.
9+
export default _;

modules/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Underscore.js 1.10.1
1+
// Underscore.js 1.10.2
22
// https://underscorejs.org
33
// (c) 2009-2020 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
44
// Underscore may be freely distributed under the MIT license.
@@ -46,7 +46,7 @@ export default function _(obj) {
4646
}
4747

4848
// Current version.
49-
export var VERSION = _.VERSION = '1.10.1';
49+
export var VERSION = _.VERSION = '1.10.2';
5050

5151
// Internal function that returns an efficient (for current engines) version
5252
// of the passed-in callback, to be repeatedly applied in other Underscore

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
},
1717
"main": "underscore.js",
1818
"module": "modules/index-all.js",
19-
"version": "1.10.1",
19+
"version": "1.10.2",
2020
"devDependencies": {
2121
"coveralls": "^2.11.2",
2222
"docco": "*",

test/utility.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@
4949
});
5050
}
5151

52+
if (typeof require == 'function') {
53+
QUnit.test('Legacy Node API', function(assert) {
54+
var filename = __dirname + '/../underscore.js';
55+
var resolved = require(filename);
56+
assert.strictEqual(resolved, resolved._);
57+
});
58+
}
59+
5260
QUnit.test('#750 - Return _ instance.', function(assert) {
5361
assert.expect(2);
5462
var instance = _([]);

underscore-min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

underscore-min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

underscore.js

Lines changed: 7 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

underscore.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)