Skip to content

Commit

Permalink
Underscore.js 1.3.3 (tiny bugfix release)
Browse files Browse the repository at this point in the history
  • Loading branch information
jashkenas committed Apr 10, 2012
1 parent d17834a commit 599d311
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions docs/underscore.html
@@ -1,4 +1,4 @@
<!DOCTYPE html> <html> <head> <title>underscore.js</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <link rel="stylesheet" media="all" href="docco.css" /> </head> <body> <div id="container"> <div id="background"></div> <table cellpadding="0" cellspacing="0"> <thead> <tr> <th class="docs"> <h1> underscore.js </h1> </th> <th class="code"> </th> </tr> </thead> <tbody> <tr id="section-1"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-1">&#182;</a> </div> <pre><code>Underscore.js 1.3.2 <!DOCTYPE html> <html> <head> <title>underscore.js</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <link rel="stylesheet" media="all" href="docco.css" /> </head> <body> <div id="container"> <div id="background"></div> <table cellpadding="0" cellspacing="0"> <thead> <tr> <th class="docs"> <h1> underscore.js </h1> </th> <th class="code"> </th> </tr> </thead> <tbody> <tr id="section-1"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-1">&#182;</a> </div> <pre><code>Underscore.js 1.3.3
(c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc. (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
Underscore is freely distributable under the MIT license. Underscore is freely distributable under the MIT license.
Portions of Underscore are inspired or borrowed from Prototype, Portions of Underscore are inspired or borrowed from Prototype,
Expand Down Expand Up @@ -31,7 +31,7 @@
<span class="nx">exports</span><span class="p">.</span><span class="nx">_</span> <span class="o">=</span> <span class="nx">_</span><span class="p">;</span> <span class="nx">exports</span><span class="p">.</span><span class="nx">_</span> <span class="o">=</span> <span class="nx">_</span><span class="p">;</span>
<span class="p">}</span> <span class="k">else</span> <span class="p">{</span> <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
<span class="nx">root</span><span class="p">[</span><span class="s1">&#39;_&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="nx">_</span><span class="p">;</span> <span class="nx">root</span><span class="p">[</span><span class="s1">&#39;_&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="nx">_</span><span class="p">;</span>
<span class="p">}</span></pre></div> </td> </tr> <tr id="section-11"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-11">&#182;</a> </div> <p>Current version.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nx">_</span><span class="p">.</span><span class="nx">VERSION</span> <span class="o">=</span> <span class="s1">&#39;1.3.2&#39;</span><span class="p">;</span></pre></div> </td> </tr> <tr id="section-12"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-12">&#182;</a> </div> <h2>Collection Functions</h2> </td> <td class="code"> <div class="highlight"><pre></pre></div> </td> </tr> <tr id="section-13"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-13">&#182;</a> </div> <p>The cornerstone, an <code>each</code> implementation, aka <code>forEach</code>. <span class="p">}</span></pre></div> </td> </tr> <tr id="section-11"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-11">&#182;</a> </div> <p>Current version.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nx">_</span><span class="p">.</span><span class="nx">VERSION</span> <span class="o">=</span> <span class="s1">&#39;1.3.3&#39;</span><span class="p">;</span></pre></div> </td> </tr> <tr id="section-12"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-12">&#182;</a> </div> <h2>Collection Functions</h2> </td> <td class="code"> <div class="highlight"><pre></pre></div> </td> </tr> <tr id="section-13"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-13">&#182;</a> </div> <p>The cornerstone, an <code>each</code> implementation, aka <code>forEach</code>.
Handles objects with the built-in <code>forEach</code>, arrays, and raw objects. Handles objects with the built-in <code>forEach</code>, arrays, and raw objects.
Delegates to <strong>ECMAScript 5</strong>'s native <code>forEach</code> if available.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="kd">var</span> <span class="nx">each</span> <span class="o">=</span> <span class="nx">_</span><span class="p">.</span><span class="nx">each</span> <span class="o">=</span> <span class="nx">_</span><span class="p">.</span><span class="nx">forEach</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">obj</span><span class="p">,</span> <span class="nx">iterator</span><span class="p">,</span> <span class="nx">context</span><span class="p">)</span> <span class="p">{</span> Delegates to <strong>ECMAScript 5</strong>'s native <code>forEach</code> if available.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="kd">var</span> <span class="nx">each</span> <span class="o">=</span> <span class="nx">_</span><span class="p">.</span><span class="nx">each</span> <span class="o">=</span> <span class="nx">_</span><span class="p">.</span><span class="nx">forEach</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">obj</span><span class="p">,</span> <span class="nx">iterator</span><span class="p">,</span> <span class="nx">context</span><span class="p">)</span> <span class="p">{</span>
<span class="k">if</span> <span class="p">(</span><span class="nx">obj</span> <span class="o">==</span> <span class="kc">null</span><span class="p">)</span> <span class="k">return</span><span class="p">;</span> <span class="k">if</span> <span class="p">(</span><span class="nx">obj</span> <span class="o">==</span> <span class="kc">null</span><span class="p">)</span> <span class="k">return</span><span class="p">;</span>
Expand Down Expand Up @@ -601,7 +601,7 @@
<span class="p">};</span></pre></div> </td> </tr> <tr id="section-126"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-126">&#182;</a> </div> <p>JavaScript micro-templating, similar to John Resig's implementation. <span class="p">};</span></pre></div> </td> </tr> <tr id="section-126"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-126">&#182;</a> </div> <p>JavaScript micro-templating, similar to John Resig's implementation.
Underscore templating handles arbitrary delimiters, preserves whitespace, Underscore templating handles arbitrary delimiters, preserves whitespace,
and correctly escapes quotes within interpolated code.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nx">_</span><span class="p">.</span><span class="nx">template</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">text</span><span class="p">,</span> <span class="nx">data</span><span class="p">,</span> <span class="nx">settings</span><span class="p">)</span> <span class="p">{</span> and correctly escapes quotes within interpolated code.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nx">_</span><span class="p">.</span><span class="nx">template</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">text</span><span class="p">,</span> <span class="nx">data</span><span class="p">,</span> <span class="nx">settings</span><span class="p">)</span> <span class="p">{</span>
<span class="nx">settings</span> <span class="o">=</span> <span class="nx">_</span><span class="p">.</span><span class="nx">extend</span><span class="p">(</span><span class="nx">_</span><span class="p">.</span><span class="nx">templateSettings</span><span class="p">,</span> <span class="nx">settings</span><span class="p">);</span></pre></div> </td> </tr> <tr id="section-127"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-127">&#182;</a> </div> <p>Compile the template source, taking care to escape characters that <span class="nx">settings</span> <span class="o">=</span> <span class="nx">_</span><span class="p">.</span><span class="nx">defaults</span><span class="p">(</span><span class="nx">settings</span> <span class="o">||</span> <span class="p">{},</span> <span class="nx">_</span><span class="p">.</span><span class="nx">templateSettings</span><span class="p">);</span></pre></div> </td> </tr> <tr id="section-127"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-127">&#182;</a> </div> <p>Compile the template source, taking care to escape characters that
cannot be included in a string literal and then unescape them in code cannot be included in a string literal and then unescape them in code
blocks.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="kd">var</span> <span class="nx">source</span> <span class="o">=</span> <span class="s2">&quot;__p+=&#39;&quot;</span> <span class="o">+</span> <span class="nx">text</span> blocks.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="kd">var</span> <span class="nx">source</span> <span class="o">=</span> <span class="s2">&quot;__p+=&#39;&quot;</span> <span class="o">+</span> <span class="nx">text</span>
<span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="nx">escaper</span><span class="p">,</span> <span class="kd">function</span><span class="p">(</span><span class="nx">match</span><span class="p">)</span> <span class="p">{</span> <span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="nx">escaper</span><span class="p">,</span> <span class="kd">function</span><span class="p">(</span><span class="nx">match</span><span class="p">)</span> <span class="p">{</span>
Expand Down
8 changes: 4 additions & 4 deletions index.html
Expand Up @@ -136,7 +136,7 @@
<div id="sidebar" class="interface"> <div id="sidebar" class="interface">


<a class="toc_title" href="#"> <a class="toc_title" href="#">
Underscore.js <span class="version">(1.3.2)</span> Underscore.js <span class="version">(1.3.3)</span>
</a> </a>


<a class="toc_title" href="#"> <a class="toc_title" href="#">
Expand Down Expand Up @@ -323,11 +323,11 @@ <h2>Downloads <i style="padding-left: 12px; font-size:12px;">(Right-click, and u


<table> <table>
<tr> <tr>
<td><a href="underscore.js">Development Version (1.3.2)</a></td> <td><a href="underscore.js">Development Version (1.3.3)</a></td>
<td><i>37kb, Uncompressed with Plentiful Comments</i></td> <td><i>37kb, Uncompressed with Plentiful Comments</i></td>
</tr> </tr>
<tr> <tr>
<td><a href="underscore-min.js">Production Version (1.3.2)</a></td> <td><a href="underscore-min.js">Production Version (1.3.3)</a></td>
<td><i>4kb, Minified and Gzipped</i></td> <td><i>4kb, Minified and Gzipped</i></td>
</tr> </tr>
</table> </table>
Expand Down Expand Up @@ -1575,7 +1575,7 @@ <h2 id="links">Links &amp; Suggested Reading</h2>
<h2 id="changelog">Change Log</h2> <h2 id="changelog">Change Log</h2>


<p> <p>
<b class="header">1.3.2</b> &mdash; <small><i>April 9, 2012</i></small><br /> <b class="header">1.3.3</b> &mdash; <small><i>April 10, 2012</i></small><br />
<ul> <ul>
<li> <li>
Many improvements to <tt>_.template</tt>, which now provides the Many improvements to <tt>_.template</tt>, which now provides the
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -6,5 +6,5 @@
"author" : "Jeremy Ashkenas <jeremy@documentcloud.org>", "author" : "Jeremy Ashkenas <jeremy@documentcloud.org>",
"repository" : {"type": "git", "url": "git://github.com/documentcloud/underscore.git"}, "repository" : {"type": "git", "url": "git://github.com/documentcloud/underscore.git"},
"main" : "underscore.js", "main" : "underscore.js",
"version" : "1.3.2" "version" : "1.3.3"
} }
6 changes: 3 additions & 3 deletions underscore-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions underscore.js
@@ -1,4 +1,4 @@
// Underscore.js 1.3.2 // Underscore.js 1.3.3
// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc. // (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
// Underscore is freely distributable under the MIT license. // Underscore is freely distributable under the MIT license.
// Portions of Underscore are inspired or borrowed from Prototype, // Portions of Underscore are inspired or borrowed from Prototype,
Expand Down Expand Up @@ -62,7 +62,7 @@
} }


// Current version. // Current version.
_.VERSION = '1.3.2'; _.VERSION = '1.3.3';


// Collection Functions // Collection Functions
// -------------------- // --------------------
Expand Down

1 comment on commit 599d311

@tirams
Copy link

@tirams tirams commented on 599d311 Apr 19, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wondering why the min underscore-min.js version above has more changes than the unmin version of underscore.js ? isn't the min version generated ?

Please sign in to comment.