|
183 | 183 | <div id="sidebar" class="interface"> |
184 | 184 |
|
185 | 185 | <a class="toc_title" href="#"> |
186 | | - Underscore.js <span class="version">(1.9.2)</span> |
| 186 | + Underscore.js <span class="version">(1.10.0)</span> |
187 | 187 | </a> |
188 | 188 | <ul class="toc_section"> |
189 | 189 | <li>» <a href="https://github.com/jashkenas/underscore">GitHub Repository</a></li> |
@@ -441,13 +441,16 @@ <h2>Downloads <i style="padding-left: 12px; font-size:12px;">(Right-click, and u |
441 | 441 |
|
442 | 442 | <table> |
443 | 443 | <tr> |
444 | | - <td><a href="underscore.js">Development Version (1.9.2)</a></td> |
445 | | - <td><i>60kb, Uncompressed with Plentiful Comments</i></td> |
| 444 | + <td><a href="underscore.js">Development Version (1.10.0)</a></td> |
| 445 | + <td> |
| 446 | + <i>60kb, Uncompressed with Plentiful Comments</i> |
| 447 | + <small>(<a href="underscore.js.map">Source Map</a>)</small> |
| 448 | + </td> |
446 | 449 | </tr> |
447 | 450 | <tr> |
448 | | - <td><a href="underscore-min.js">Production Version (1.9.2)</a></td> |
| 451 | + <td><a href="underscore-min.js">Production Version (1.10.0)</a></td> |
449 | 452 | <td> |
450 | | - <i>6.5kb, Minified and Gzipped</i> |
| 453 | + <i>6.78kb, Minified and Gzipped</i> |
451 | 454 | <small>(<a href="underscore-min.js.map">Source Map</a>)</small> |
452 | 455 | </td> |
453 | 456 | </tr> |
@@ -476,7 +479,13 @@ <h2>Installation</h2> |
476 | 479 | <b>Bower</b> <tt>bower install underscore</tt> |
477 | 480 | </li> |
478 | 481 | <li> |
479 | | - <b>Component</b> <tt>component install jashkenas/underscore</tt> |
| 482 | + <b>ExtendScript</b> <tt>#include "underscore.js"</tt> |
| 483 | + </li> |
| 484 | + <li> |
| 485 | + <b>Rollup</b> If you want to enable treeshaking and you don’t |
| 486 | + need the full <tt>_</tt> object (with all Underscore functions as |
| 487 | + properties), you can import individual functions by name from |
| 488 | + <tt>underscore/modules/index</tt> instead of <tt>underscore</tt>. |
480 | 489 | </li> |
481 | 490 | </ul> |
482 | 491 |
|
@@ -1950,12 +1959,15 @@ <h2 id="utility">Utility Functions</h2> |
1950 | 1959 | <p id="noConflict"> |
1951 | 1960 | <b class="header">noConflict</b><code>_.noConflict()</code> |
1952 | 1961 | <br /> |
1953 | | - Give control of the <tt>_</tt> variable back to its previous owner. Returns |
1954 | | - a reference to the <b>Underscore</b> object. |
| 1962 | + Give control of the global <tt>_</tt> variable back to its previous |
| 1963 | + owner. Returns a reference to the <b>Underscore</b> object. |
1955 | 1964 | </p> |
1956 | 1965 | <pre> |
1957 | 1966 | var underscore = _.noConflict(); |
1958 | 1967 | </pre> |
| 1968 | + <p> |
| 1969 | + The <tt>_.noConflict</tt> function is not present if you use the EcmaScript 6, AMD or CommonJS module system to import Underscore. |
| 1970 | + </p> |
1959 | 1971 |
|
1960 | 1972 | <p id="identity"> |
1961 | 1973 | <b class="header">identity</b><code>_.identity(value)</code> |
@@ -2392,8 +2404,39 @@ <h2 id="links">Links & Suggested Reading</h2> |
2392 | 2404 |
|
2393 | 2405 | <h2 id="changelog">Change Log</h2> |
2394 | 2406 |
|
| 2407 | + <p id="1.10.0"> |
| 2408 | + <b class="header">1.10.0</b> — <!--TODO: date--> — <a href="https://github.com/jashkenas/underscore/compare/1.9.2...1.10.0">Diff</a> — <a href="https://cdn.rawgit.com/jashkenas/underscore/1.10.0/index.html">Docs</a><br /> |
| 2409 | + <ul> |
| 2410 | + <li> |
| 2411 | + Explicitly states in the documentation, and verifies in the |
| 2412 | + unittests, that <tt>_.sortedIndex(array, value)</tt> always returns |
| 2413 | + the lower bound, i.e., the smallest index, at which <tt>value</tt> |
| 2414 | + may be inserted in <tt>array</tt>. |
| 2415 | + </li> |
| 2416 | + <li> |
| 2417 | + Makes the notation of the <tt>_.max</tt> unittest consistent with |
| 2418 | + other unittests. |
| 2419 | + </li> |
| 2420 | + <li> |
| 2421 | + Fixes a bug that would cause infinite recursion if an overridden |
| 2422 | + implementation of <tt>_.iteratee</tt> attempted to fall back to the |
| 2423 | + original implementation. |
| 2424 | + </li> |
| 2425 | + <li> |
| 2426 | + Restores compatibility with EcmaScript 3 and ExtendScript. |
| 2427 | + </li> |
| 2428 | + <li> |
| 2429 | + Reformats the source code to use EcmaScript 6 <tt>export</tt> |
| 2430 | + notation. The <tt>underscore.js</tt> UMD bundle is now <i>compiled |
| 2431 | + from</i> underlying source modules instead of <i>being</i> the |
| 2432 | + source. From now on, Rollup users have the option to import from |
| 2433 | + the underlying source module in order to enable treeshaking. |
| 2434 | + </li> |
| 2435 | + </ul> |
| 2436 | + </p> |
| 2437 | + |
2395 | 2438 | <p id="1.9.2"> |
2396 | | - <b class="header">1.9.2</b> — <small><i>Jan 6, 2020</i></small> — <a href="https://github.com/jashkenas/underscore/compare/1.9.1...1.9.2">Diff</a> — <a href="https://cdn.rawgit.com/jashkenas/underscore/1.9.1/index.html">Docs</a><br /> |
| 2439 | + <b class="header">1.9.2</b> — <small><i>Jan 6, 2020</i></small> — <a href="https://github.com/jashkenas/underscore/compare/1.9.1...1.9.2">Diff</a> — <a href="https://cdn.rawgit.com/jashkenas/underscore/1.9.2/index.html">Docs</a><br /> |
2397 | 2440 | <ul> |
2398 | 2441 | <li> |
2399 | 2442 | No code changes. Updated a test to help out |
@@ -2444,6 +2487,10 @@ <h2 id="changelog">Change Log</h2> |
2444 | 2487 | Adds support for several environments including: WebWorkers, |
2445 | 2488 | browserify and ES6 imports. |
2446 | 2489 | </li> |
| 2490 | + <li> |
| 2491 | + Removes the <tt>component.json</tt> as the Component package |
| 2492 | + management system is discontinued. |
| 2493 | + </li> |
2447 | 2494 | <li> |
2448 | 2495 | The placeholder used for partial is now configurable by setting |
2449 | 2496 | <code>_.partial.placeholder</code>. |
|
0 commit comments