|
180 | 180 | <div id="sidebar" class="interface"> |
181 | 181 |
|
182 | 182 | <a class="toc_title" href="#"> |
183 | | - Underscore.js <span class="version">(1.8.2)</span> |
| 183 | + Underscore.js <span class="version">(1.8.3)</span> |
184 | 184 | </a> |
185 | 185 | <ul class="toc_section"> |
186 | 186 | <li>» <a href="https://github.com/jashkenas/underscore">GitHub Repository</a></li> |
|
279 | 279 | <li>- <a href="#mapObject">mapObject</a></li> |
280 | 280 | <li>- <a href="#pairs">pairs</a></li> |
281 | 281 | <li>- <a href="#invert">invert</a></li> |
| 282 | + <li>- <a href="#create">create</a></li> |
282 | 283 | <li>- <a href="#object-functions">functions</a></li> |
283 | 284 | <li>- <a href="#findKey">findKey</a></li> |
284 | 285 | <li>- <a href="#extend">extend</a></li> |
@@ -402,11 +403,11 @@ <h2>Downloads <i style="padding-left: 12px; font-size:12px;">(Right-click, and u |
402 | 403 |
|
403 | 404 | <table> |
404 | 405 | <tr> |
405 | | - <td><a href="underscore.js">Development Version (1.8.2)</a></td> |
406 | | - <td><i>51kb, Uncompressed with Plentiful Comments</i></td> |
| 406 | + <td><a href="underscore.js">Development Version (1.8.3)</a></td> |
| 407 | + <td><i>52kb, Uncompressed with Plentiful Comments</i></td> |
407 | 408 | </tr> |
408 | 409 | <tr> |
409 | | - <td><a href="underscore-min.js">Production Version (1.8.2)</a></td> |
| 410 | + <td><a href="underscore-min.js">Production Version (1.8.3)</a></td> |
410 | 411 | <td> |
411 | 412 | <i>5.7kb, Minified and Gzipped</i> |
412 | 413 | <small>(<a href="underscore-min.map">Source Map</a>)</small> |
@@ -1402,6 +1403,17 @@ <h2 id="objects">Object Functions</h2> |
1402 | 1403 | <pre> |
1403 | 1404 | _.invert({Moe: "Moses", Larry: "Louis", Curly: "Jerome"}); |
1404 | 1405 | => {Moses: "Moe", Louis: "Larry", Jerome: "Curly"}; |
| 1406 | +</pre> |
| 1407 | + |
| 1408 | + <p id="create"> |
| 1409 | + <b class="header">create</b><code>_.create(prototype, props)</code> |
| 1410 | + <br /> |
| 1411 | + Creates a new object with the given prototype, optionally attaching |
| 1412 | + <b>props</b> as <i>own</i> properties. Basically, <tt>Object.create</tt>, |
| 1413 | + but without all of the property descriptor jazz. |
| 1414 | + </p> |
| 1415 | + <pre> |
| 1416 | +var moe = _.create(Stooge.prototype, {name: "Moe"}); |
1405 | 1417 | </pre> |
1406 | 1418 |
|
1407 | 1419 | <p id="object-functions"> |
@@ -2193,6 +2205,20 @@ <h2 id="links">Links & Suggested Reading</h2> |
2193 | 2205 |
|
2194 | 2206 | <h2 id="changelog">Change Log</h2> |
2195 | 2207 |
|
| 2208 | + <p id="1.8.3"> |
| 2209 | + <b class="header">1.8.3</b> — <small><i>April 2, 2015</i></small> — <a href="https://github.com/jashkenas/underscore/compare/1.8.2...1.8.3">Diff</a> — <a href="https://cdn.rawgit.com/jashkenas/underscore/1.8.3/index.html">Docs</a><br /> |
| 2210 | + <ul> |
| 2211 | + <li> |
| 2212 | + Adds an <tt>_.create</tt> method, as a slimmed down version of |
| 2213 | + <tt>Object.create</tt>. |
| 2214 | + </li> |
| 2215 | + <li> |
| 2216 | + Works around an iOS bug that can improperly cause <tt>isArrayLike</tt> |
| 2217 | + to be JIT-ed. Also fixes a bug when passing <tt>0</tt> to <tt>isArrayLike</tt>. |
| 2218 | + </li> |
| 2219 | + </ul> |
| 2220 | + </p> |
| 2221 | + |
2196 | 2222 | <p id="1.8.2"> |
2197 | 2223 | <b class="header">1.8.2</b> — <small><i>Feb. 22, 2015</i></small> — <a href="https://github.com/jashkenas/underscore/compare/1.8.1...1.8.2">Diff</a> — <a href="https://cdn.rawgit.com/jashkenas/underscore/1.8.2/index.html">Docs</a><br /> |
2198 | 2224 | <ul> |
|
0 commit comments