Commits

Rich Manalang [Atlassian] committed c39a522

dynamic copyright year

  • Participants
  • Parent commits ace8d13

Comments (0)

Files changed (3)

dist/backbone.brace.js

 //     Copyright 2012 Atlassian Software Systems Pty Ltd
 //     Licensed under the Apache License, Version 2.0
 
-// For usage instructions checkout the [README](../README.md). This is
-// the annotated source.
 (function () {
 
     // node / browser imports, copied from here

docs/backbone.brace.html

 <!DOCTYPE html>  <html> <head>   <title>backbone.brace.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>               backbone.brace.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>Backbone Brace - 2012/3/5
 Copyright 2012 Atlassian Software Systems Pty Ltd
 Licensed under the Apache License, Version 2.0
-</code></pre>             </td>             <td class="code">               <div class="highlight"><pre></pre></div>             </td>           </tr>                               <tr id="section-2">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-2">&#182;</a>               </div>               <p>For usage instructions checkout the <a href="../README.md">README</a>. This is
-the annotated source.</p>             </td>             <td class="code">               <div class="highlight"><pre><span class="p">(</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span></pre></div>             </td>           </tr>                               <tr id="section-3">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-3">&#182;</a>               </div>               <p>node / browser imports, copied from here</p>             </td>             <td class="code">               <div class="highlight"><pre>    <span class="kd">var</span> <span class="nx">root</span> <span class="o">=</span> <span class="k">this</span><span class="p">;</span>
+</code></pre>             </td>             <td class="code">               <div class="highlight"><pre><span class="p">(</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span></pre></div>             </td>           </tr>                               <tr id="section-2">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-2">&#182;</a>               </div>               <p>node / browser imports, copied from here</p>             </td>             <td class="code">               <div class="highlight"><pre>    <span class="kd">var</span> <span class="nx">root</span> <span class="o">=</span> <span class="k">this</span><span class="p">;</span>
     <span class="kd">var</span> <span class="nx">Brace</span><span class="p">;</span>
     <span class="k">if</span> <span class="p">(</span><span class="k">typeof</span> <span class="nx">exports</span> <span class="o">!==</span> <span class="s1">&#39;undefined&#39;</span><span class="p">)</span> <span class="p">{</span>
         <span class="nx">Brace</span> <span class="o">=</span> <span class="nx">exports</span><span class="p">;</span>
     <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">_</span> <span class="o">&amp;&amp;</span> <span class="p">(</span><span class="k">typeof</span> <span class="nx">require</span> <span class="o">!==</span> <span class="s1">&#39;undefined&#39;</span><span class="p">)){</span> <span class="nx">_</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span><span class="s1">&#39;underscore&#39;</span><span class="p">);</span> <span class="p">}</span>
 
     <span class="kd">var</span> <span class="nx">Backbone</span> <span class="o">=</span> <span class="nx">root</span><span class="p">.</span><span class="nx">Backbone</span><span class="p">;</span>
-    <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">Backbone</span> <span class="o">&amp;&amp;</span> <span class="p">(</span><span class="k">typeof</span> <span class="nx">require</span> <span class="o">!==</span> <span class="s1">&#39;undefined&#39;</span><span class="p">))</span> <span class="p">{</span> <span class="nx">Backbone</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span><span class="s1">&#39;backbone&#39;</span><span class="p">);</span> <span class="p">}</span></pre></div>             </td>           </tr>                               <tr id="section-4">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-4">&#182;</a>               </div>               <h2>Brace.Mixins</h2>
+    <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">Backbone</span> <span class="o">&amp;&amp;</span> <span class="p">(</span><span class="k">typeof</span> <span class="nx">require</span> <span class="o">!==</span> <span class="s1">&#39;undefined&#39;</span><span class="p">))</span> <span class="p">{</span> <span class="nx">Backbone</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span><span class="s1">&#39;backbone&#39;</span><span class="p">);</span> <span class="p">}</span></pre></div>             </td>           </tr>                               <tr id="section-3">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-3">&#182;</a>               </div>               <h2>Brace.Mixins</h2>
 
-<p>Mixin utilities</p>             </td>             <td class="code">               <div class="highlight"><pre>    <span class="nx">Brace</span><span class="p">.</span><span class="nx">Mixins</span> <span class="o">=</span> <span class="p">{</span></pre></div>             </td>           </tr>                               <tr id="section-5">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-5">&#182;</a>               </div>               <p>Creates a camelCased method name</p>             </td>             <td class="code">               <div class="highlight"><pre>        <span class="nx">createMethodName</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">prefix</span><span class="p">,</span> <span class="nx">suffix</span><span class="p">)</span> <span class="p">{</span>
+<p>Mixin utilities</p>             </td>             <td class="code">               <div class="highlight"><pre>    <span class="nx">Brace</span><span class="p">.</span><span class="nx">Mixins</span> <span class="o">=</span> <span class="p">{</span></pre></div>             </td>           </tr>                               <tr id="section-4">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-4">&#182;</a>               </div>               <p>Creates a camelCased method name</p>             </td>             <td class="code">               <div class="highlight"><pre>        <span class="nx">createMethodName</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">prefix</span><span class="p">,</span> <span class="nx">suffix</span><span class="p">)</span> <span class="p">{</span>
             <span class="k">return</span> <span class="nx">prefix</span> <span class="o">+</span> <span class="nx">suffix</span><span class="p">.</span><span class="nx">charAt</span><span class="p">(</span><span class="mi">0</span><span class="p">).</span><span class="nx">toUpperCase</span><span class="p">()</span> <span class="o">+</span> <span class="nx">suffix</span><span class="p">.</span><span class="nx">substr</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span>
-        <span class="p">},</span></pre></div>             </td>           </tr>                               <tr id="section-6">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-6">&#182;</a>               </div>               <p>Applies a mixin to the given constructor's prototype.</p>             </td>             <td class="code">               <div class="highlight"><pre>        <span class="nx">applyMixin</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">ctor</span><span class="p">,</span> <span class="nx">mixin</span><span class="p">)</span> <span class="p">{</span>
+        <span class="p">},</span></pre></div>             </td>           </tr>                               <tr id="section-5">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-5">&#182;</a>               </div>               <p>Applies a mixin to the given constructor's prototype.</p>             </td>             <td class="code">               <div class="highlight"><pre>        <span class="nx">applyMixin</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">ctor</span><span class="p">,</span> <span class="nx">mixin</span><span class="p">)</span> <span class="p">{</span>
             <span class="nx">_</span><span class="p">.</span><span class="nx">forEach</span><span class="p">(</span><span class="nx">_</span><span class="p">.</span><span class="nx">keys</span><span class="p">(</span><span class="nx">mixin</span><span class="p">),</span> <span class="kd">function</span><span class="p">(</span><span class="nx">key</span><span class="p">)</span> <span class="p">{</span>
-                <span class="kd">var</span> <span class="nx">proto</span> <span class="o">=</span> <span class="nx">ctor</span><span class="p">.</span><span class="nx">prototype</span><span class="p">;</span></pre></div>             </td>           </tr>                               <tr id="section-7">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-7">&#182;</a>               </div>               <p><code>initialize</code> is not mixed in - we compose the mixin's initialize with the existing initialize method (if it exists).</p>             </td>             <td class="code">               <div class="highlight"><pre>                <span class="k">if</span> <span class="p">(</span><span class="s2">&quot;initialize&quot;</span> <span class="o">===</span> <span class="nx">key</span><span class="p">)</span> <span class="p">{</span>
+                <span class="kd">var</span> <span class="nx">proto</span> <span class="o">=</span> <span class="nx">ctor</span><span class="p">.</span><span class="nx">prototype</span><span class="p">;</span></pre></div>             </td>           </tr>                               <tr id="section-6">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-6">&#182;</a>               </div>               <p><code>initialize</code> is not mixed in - we compose the mixin's initialize with the existing initialize method (if it exists).</p>             </td>             <td class="code">               <div class="highlight"><pre>                <span class="k">if</span> <span class="p">(</span><span class="s2">&quot;initialize&quot;</span> <span class="o">===</span> <span class="nx">key</span><span class="p">)</span> <span class="p">{</span>
                     <span class="kd">var</span> <span class="nx">oldInitialize</span> <span class="o">=</span> <span class="nx">proto</span><span class="p">.</span><span class="nx">initialize</span><span class="p">;</span>
                     <span class="nx">proto</span><span class="p">.</span><span class="nx">initialize</span> <span class="o">=</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
                         <span class="nx">mixin</span><span class="p">.</span><span class="nx">initialize</span><span class="p">.</span><span class="nx">apply</span><span class="p">(</span><span class="k">this</span><span class="p">,</span> <span class="nx">arguments</span><span class="p">);</span>
                         <span class="p">}</span>
                     <span class="p">};</span>
                     <span class="k">return</span><span class="p">;</span>
-                <span class="p">}</span></pre></div>             </td>           </tr>                               <tr id="section-8">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-8">&#182;</a>               </div>               <p><code>validate</code> is not mixed in - we compose the mixin's validate with the existing validate method (if it exists).</p>             </td>             <td class="code">               <div class="highlight"><pre>                <span class="k">if</span> <span class="p">(</span><span class="s2">&quot;validate&quot;</span> <span class="o">===</span> <span class="nx">key</span><span class="p">)</span> <span class="p">{</span>
+                <span class="p">}</span></pre></div>             </td>           </tr>                               <tr id="section-7">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-7">&#182;</a>               </div>               <p><code>validate</code> is not mixed in - we compose the mixin's validate with the existing validate method (if it exists).</p>             </td>             <td class="code">               <div class="highlight"><pre>                <span class="k">if</span> <span class="p">(</span><span class="s2">&quot;validate&quot;</span> <span class="o">===</span> <span class="nx">key</span><span class="p">)</span> <span class="p">{</span>
                     <span class="kd">var</span> <span class="nx">oldValidate</span> <span class="o">=</span> <span class="nx">proto</span><span class="p">.</span><span class="nx">validate</span><span class="p">;</span>
                     <span class="nx">proto</span><span class="p">.</span><span class="nx">validate</span> <span class="o">=</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
                         <span class="kd">var</span> <span class="nx">errors</span> <span class="o">=</span> <span class="nx">mixin</span><span class="p">.</span><span class="nx">validate</span><span class="p">.</span><span class="nx">apply</span><span class="p">(</span><span class="k">this</span><span class="p">,</span> <span class="nx">arguments</span><span class="p">);</span>
                         <span class="p">}</span>
                     <span class="p">};</span>
                     <span class="k">return</span><span class="p">;</span>
-                <span class="p">}</span></pre></div>             </td>           </tr>                               <tr id="section-9">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-9">&#182;</a>               </div>               <p><code>defaults</code> are not mixed in - we compose the mixin's defaults with existing defaults if they exist</p>             </td>             <td class="code">               <div class="highlight"><pre>                <span class="k">if</span> <span class="p">(</span><span class="s2">&quot;defaults&quot;</span> <span class="o">===</span> <span class="nx">key</span><span class="p">)</span> <span class="p">{</span>
+                <span class="p">}</span></pre></div>             </td>           </tr>                               <tr id="section-8">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-8">&#182;</a>               </div>               <p><code>defaults</code> are not mixed in - we compose the mixin's defaults with existing defaults if they exist</p>             </td>             <td class="code">               <div class="highlight"><pre>                <span class="k">if</span> <span class="p">(</span><span class="s2">&quot;defaults&quot;</span> <span class="o">===</span> <span class="nx">key</span><span class="p">)</span> <span class="p">{</span>
                     <span class="kd">var</span> <span class="nx">defaults</span> <span class="o">=</span> <span class="nx">proto</span><span class="p">.</span><span class="nx">defaults</span> <span class="o">||</span> <span class="p">(</span><span class="nx">proto</span><span class="p">.</span><span class="nx">defaults</span> <span class="o">=</span> <span class="p">{});</span>
                     <span class="kd">var</span> <span class="nx">mixinDefaults</span> <span class="o">=</span> <span class="nx">mixin</span><span class="p">[</span><span class="nx">key</span><span class="p">];</span>
                     <span class="k">for</span> <span class="p">(</span><span class="kd">var</span> <span class="nx">id</span> <span class="k">in</span> <span class="nx">mixinDefaults</span><span class="p">)</span> <span class="p">{</span>
                         <span class="nx">defaults</span><span class="p">[</span><span class="nx">id</span><span class="p">]</span> <span class="o">=</span> <span class="nx">mixinDefaults</span><span class="p">[</span><span class="nx">id</span><span class="p">];</span>
                     <span class="p">}</span>
                     <span class="k">return</span><span class="p">;</span>
-                <span class="p">}</span></pre></div>             </td>           </tr>                               <tr id="section-10">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-10">&#182;</a>               </div>               <p><code>namedAttributes</code> are added to the mixin, and we mixin in getters and setters for each attribute.</p>             </td>             <td class="code">               <div class="highlight"><pre>                <span class="k">if</span> <span class="p">(</span><span class="s2">&quot;namedAttributes&quot;</span> <span class="o">===</span> <span class="nx">key</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><code>namedAttributes</code> must be an array</p>             </td>             <td class="code">               <div class="highlight"><pre>                    <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">_</span><span class="p">.</span><span class="nx">isArray</span><span class="p">(</span><span class="nx">mixin</span><span class="p">[</span><span class="nx">key</span><span class="p">]))</span> <span class="p">{</span>
+                <span class="p">}</span></pre></div>             </td>           </tr>                               <tr id="section-9">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-9">&#182;</a>               </div>               <p><code>namedAttributes</code> are added to the mixin, and we mixin in getters and setters for each attribute.</p>             </td>             <td class="code">               <div class="highlight"><pre>                <span class="k">if</span> <span class="p">(</span><span class="s2">&quot;namedAttributes&quot;</span> <span class="o">===</span> <span class="nx">key</span><span class="p">)</span> <span class="p">{</span></pre></div>             </td>           </tr>                               <tr id="section-10">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-10">&#182;</a>               </div>               <p><code>namedAttributes</code> must be an array</p>             </td>             <td class="code">               <div class="highlight"><pre>                    <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">_</span><span class="p">.</span><span class="nx">isArray</span><span class="p">(</span><span class="nx">mixin</span><span class="p">[</span><span class="nx">key</span><span class="p">]))</span> <span class="p">{</span>
                         <span class="k">throw</span> <span class="s2">&quot;Expects namedAttributes member on mixin to be an array&quot;</span><span class="p">;</span>
                     <span class="p">}</span>
                     <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">proto</span><span class="p">.</span><span class="nx">namedAttributes</span><span class="p">)</span> <span class="p">{</span>
                     <span class="p">}</span>
                     <span class="nx">proto</span><span class="p">.</span><span class="nx">namedAttributes</span> <span class="o">=</span> <span class="nx">proto</span><span class="p">.</span><span class="nx">namedAttributes</span><span class="p">.</span><span class="nx">concat</span><span class="p">(</span><span class="nx">mixin</span><span class="p">[</span><span class="nx">key</span><span class="p">]);</span>
                     <span class="k">return</span><span class="p">;</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>               <p><code>namedEvents</code> are added to the mixin, and we mix in on and trigger methods for each event.</p>             </td>             <td class="code">               <div class="highlight"><pre>                <span class="k">if</span> <span class="p">(</span><span class="s2">&quot;namedEvents&quot;</span> <span class="o">===</span> <span class="nx">key</span><span class="p">)</span> <span class="p">{</span></pre></div>             </td>           </tr>                               <tr id="section-13">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-13">&#182;</a>               </div>               <p><code>events</code> must be an array</p>             </td>             <td class="code">               <div class="highlight"><pre>                    <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">_</span><span class="p">.</span><span class="nx">isArray</span><span class="p">(</span><span class="nx">mixin</span><span class="p">[</span><span class="nx">key</span><span class="p">]))</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><code>namedEvents</code> are added to the mixin, and we mix in on and trigger methods for each event.</p>             </td>             <td class="code">               <div class="highlight"><pre>                <span class="k">if</span> <span class="p">(</span><span class="s2">&quot;namedEvents&quot;</span> <span class="o">===</span> <span class="nx">key</span><span class="p">)</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>               <p><code>events</code> must be an array</p>             </td>             <td class="code">               <div class="highlight"><pre>                    <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">_</span><span class="p">.</span><span class="nx">isArray</span><span class="p">(</span><span class="nx">mixin</span><span class="p">[</span><span class="nx">key</span><span class="p">]))</span> <span class="p">{</span>
                         <span class="k">throw</span> <span class="s2">&quot;Expects events member on mixin to be an array&quot;</span><span class="p">;</span>
                     <span class="p">}</span>
                     <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nx">proto</span><span class="p">.</span><span class="nx">namedEvents</span><span class="p">)</span> <span class="p">{</span>
                     <span class="p">}</span>
                     <span class="nx">proto</span><span class="p">.</span><span class="nx">namedEvents</span> <span class="o">=</span> <span class="nx">proto</span><span class="p">.</span><span class="nx">namedEvents</span><span class="p">.</span><span class="nx">concat</span><span class="p">(</span><span class="nx">mixin</span><span class="p">[</span><span class="nx">key</span><span class="p">]);</span>
                     <span class="k">return</span><span class="p">;</span>
-                <span class="p">}</span></pre></div>             </td>           </tr>                               <tr id="section-14">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-14">&#182;</a>               </div>               <p>Name collisions with other mixins or or the object we're mixing into result in violent and forceful disapproval.</p>             </td>             <td class="code">               <div class="highlight"><pre>                <span class="k">if</span> <span class="p">(</span><span class="nx">proto</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="nx">key</span><span class="p">))</span> <span class="p">{</span>
+                <span class="p">}</span></pre></div>             </td>           </tr>                               <tr id="section-13">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-13">&#182;</a>               </div>               <p>Name collisions with other mixins or or the object we're mixing into result in violent and forceful disapproval.</p>             </td>             <td class="code">               <div class="highlight"><pre>                <span class="k">if</span> <span class="p">(</span><span class="nx">proto</span><span class="p">.</span><span class="nx">hasOwnProperty</span><span class="p">(</span><span class="nx">key</span><span class="p">))</span> <span class="p">{</span>
                     <span class="k">throw</span> <span class="s2">&quot;Mixin error: class already has property &#39;&quot;</span> <span class="o">+</span> <span class="nx">key</span> <span class="o">+</span> <span class="s2">&quot;&#39; defined&quot;</span><span class="p">;</span>
                 <span class="p">}</span>
                 <span class="nx">proto</span><span class="p">[</span><span class="nx">key</span><span class="p">]</span> <span class="o">=</span> <span class="nx">mixin</span><span class="p">[</span><span class="nx">key</span><span class="p">];</span>
             <span class="p">},</span> <span class="k">this</span><span class="p">);</span>
         <span class="p">}</span>
-    <span class="p">};</span></pre></div>             </td>           </tr>                               <tr id="section-15">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-15">&#182;</a>               </div>               <h2>Brace.AttributesMixinCreator</h2>             </td>             <td class="code">               <div class="highlight"><pre>    <span class="nx">Brace</span><span class="p">.</span><span class="nx">AttributesMixinCreator</span> <span class="o">=</span> <span class="p">{</span></pre></div>             </td>           </tr>                               <tr id="section-16">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-16">&#182;</a>               </div>               <p>Creates a mixin of getter and setter methods for each item in the given attribute list.
+    <span class="p">};</span></pre></div>             </td>           </tr>                               <tr id="section-14">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-14">&#182;</a>               </div>               <h2>Brace.AttributesMixinCreator</h2>             </td>             <td class="code">               <div class="highlight"><pre>    <span class="nx">Brace</span><span class="p">.</span><span class="nx">AttributesMixinCreator</span> <span class="o">=</span> <span class="p">{</span></pre></div>             </td>           </tr>                               <tr id="section-15">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-15">&#182;</a>               </div>               <p>Creates a mixin of getter and setter methods for each item in the given attribute list.
 A getter and setter for <code>id</code> is always generated.</p>             </td>             <td class="code">               <div class="highlight"><pre>        <span class="nx">create</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">attributes</span><span class="p">)</span> <span class="p">{</span>
             <span class="kd">var</span> <span class="nx">methods</span> <span class="o">=</span> <span class="p">{};</span>
 
                 <span class="nx">attributes</span><span class="p">.</span><span class="nx">unshift</span><span class="p">(</span><span class="s2">&quot;id&quot;</span><span class="p">);</span>
             <span class="p">}</span>
 
-            <span class="nx">_</span><span class="p">.</span><span class="nx">each</span><span class="p">(</span><span class="nx">attributes</span><span class="p">,</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">attribute</span><span class="p">)</span> <span class="p">{</span></pre></div>             </td>           </tr>                               <tr id="section-17">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-17">&#182;</a>               </div>               <p>TODO: has, escape, unset</p>             </td>             <td class="code">               <div class="highlight"><pre>                <span class="kd">var</span> <span class="nx">setter</span> <span class="o">=</span> <span class="nx">Brace</span><span class="p">.</span><span class="nx">Mixins</span><span class="p">.</span><span class="nx">createMethodName</span><span class="p">(</span><span class="s2">&quot;set&quot;</span><span class="p">,</span> <span class="nx">attribute</span><span class="p">);</span>
+            <span class="nx">_</span><span class="p">.</span><span class="nx">each</span><span class="p">(</span><span class="nx">attributes</span><span class="p">,</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">attribute</span><span class="p">)</span> <span class="p">{</span></pre></div>             </td>           </tr>                               <tr id="section-16">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-16">&#182;</a>               </div>               <p>TODO: has, escape, unset</p>             </td>             <td class="code">               <div class="highlight"><pre>                <span class="kd">var</span> <span class="nx">setter</span> <span class="o">=</span> <span class="nx">Brace</span><span class="p">.</span><span class="nx">Mixins</span><span class="p">.</span><span class="nx">createMethodName</span><span class="p">(</span><span class="s2">&quot;set&quot;</span><span class="p">,</span> <span class="nx">attribute</span><span class="p">);</span>
                 <span class="nx">methods</span><span class="p">[</span><span class="nx">setter</span><span class="p">]</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">val</span><span class="p">,</span><span class="nx">options</span><span class="p">)</span> <span class="p">{</span>
                     <span class="kd">var</span> <span class="nx">obj</span> <span class="o">=</span> <span class="p">{};</span>
                     <span class="nx">obj</span><span class="p">[</span><span class="nx">attribute</span><span class="p">]</span> <span class="o">=</span> <span class="nx">val</span><span class="p">;</span>
             <span class="p">});</span>
             <span class="k">return</span> <span class="nx">methods</span><span class="p">;</span>
         <span class="p">}</span>
-    <span class="p">};</span></pre></div>             </td>           </tr>                               <tr id="section-18">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-18">&#182;</a>               </div>               <h2>Brace.EventsMixinCreator</h2>             </td>             <td class="code">               <div class="highlight"><pre>    <span class="nx">Brace</span><span class="p">.</span><span class="nx">EventsMixinCreator</span> <span class="o">=</span> <span class="p">{</span></pre></div>             </td>           </tr>                               <tr id="section-19">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-19">&#182;</a>               </div>               <p>Creates a mixin of on and trigger methods for each item in the given list of events.</p>             </td>             <td class="code">               <div class="highlight"><pre>        <span class="nx">create</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">events</span><span class="p">)</span> <span class="p">{</span>
+    <span class="p">};</span></pre></div>             </td>           </tr>                               <tr id="section-17">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-17">&#182;</a>               </div>               <h2>Brace.EventsMixinCreator</h2>             </td>             <td class="code">               <div class="highlight"><pre>    <span class="nx">Brace</span><span class="p">.</span><span class="nx">EventsMixinCreator</span> <span class="o">=</span> <span class="p">{</span></pre></div>             </td>           </tr>                               <tr id="section-18">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-18">&#182;</a>               </div>               <p>Creates a mixin of on and trigger methods for each item in the given list of events.</p>             </td>             <td class="code">               <div class="highlight"><pre>        <span class="nx">create</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">events</span><span class="p">)</span> <span class="p">{</span>
             <span class="kd">var</span> <span class="nx">eventMethods</span> <span class="o">=</span> <span class="p">{};</span>
-            <span class="kd">var</span> <span class="nx">createEvent</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">eventName</span><span class="p">)</span> <span class="p">{</span></pre></div>             </td>           </tr>                               <tr id="section-20">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-20">&#182;</a>               </div>               <p>TODO: off</p>             </td>             <td class="code">               <div class="highlight"><pre>                <span class="kd">var</span> <span class="nx">binder</span> <span class="o">=</span> <span class="nx">Brace</span><span class="p">.</span><span class="nx">Mixins</span><span class="p">.</span><span class="nx">createMethodName</span><span class="p">(</span><span class="s2">&quot;on&quot;</span><span class="p">,</span> <span class="nx">eventName</span><span class="p">);</span>
+            <span class="kd">var</span> <span class="nx">createEvent</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">eventName</span><span class="p">)</span> <span class="p">{</span></pre></div>             </td>           </tr>                               <tr id="section-19">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-19">&#182;</a>               </div>               <p>TODO: off</p>             </td>             <td class="code">               <div class="highlight"><pre>                <span class="kd">var</span> <span class="nx">binder</span> <span class="o">=</span> <span class="nx">Brace</span><span class="p">.</span><span class="nx">Mixins</span><span class="p">.</span><span class="nx">createMethodName</span><span class="p">(</span><span class="s2">&quot;on&quot;</span><span class="p">,</span> <span class="nx">eventName</span><span class="p">);</span>
                 <span class="nx">eventMethods</span><span class="p">[</span><span class="nx">binder</span><span class="p">]</span> <span class="o">=</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
                     <span class="k">return</span> <span class="k">this</span><span class="p">.</span><span class="nx">on</span><span class="p">.</span><span class="nx">apply</span><span class="p">(</span><span class="k">this</span><span class="p">,</span> <span class="p">[</span><span class="nx">eventName</span><span class="p">].</span><span class="nx">concat</span><span class="p">(</span><span class="nx">_</span><span class="p">.</span><span class="nx">toArray</span><span class="p">(</span><span class="nx">arguments</span><span class="p">)));</span>
                 <span class="p">};</span>
     <span class="kd">function</span> <span class="nx">generateMixinExtend</span><span class="p">(</span><span class="nx">oldExtend</span><span class="p">)</span> <span class="p">{</span>
         <span class="k">return</span> <span class="kd">function</span> <span class="nx">newExtend</span><span class="p">(</span><span class="nx">protoProps</span><span class="p">,</span> <span class="nx">classProps</span><span class="p">)</span> <span class="p">{</span>
             <span class="kd">var</span> <span class="nx">child</span><span class="p">;</span>
-            <span class="kd">var</span> <span class="nx">cleanProtoProps</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">protoProps</span><span class="p">);</span></pre></div>             </td>           </tr>                               <tr id="section-21">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-21">&#182;</a>               </div>               <p>Remove <code>mixins</code> - we don't want to see them on the created prototype. Note that we do want to see <code>namedAttributes</code> and <code>namedEvents</code> for debugging</p>             </td>             <td class="code">               <div class="highlight"><pre>            <span class="kd">var</span> <span class="nx">mixins</span><span class="p">;</span>
+            <span class="kd">var</span> <span class="nx">cleanProtoProps</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">protoProps</span><span class="p">);</span></pre></div>             </td>           </tr>                               <tr id="section-20">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-20">&#182;</a>               </div>               <p>Remove <code>mixins</code> - we don't want to see them on the created prototype. Note that we do want to see <code>namedAttributes</code> and <code>namedEvents</code> for debugging</p>             </td>             <td class="code">               <div class="highlight"><pre>            <span class="kd">var</span> <span class="nx">mixins</span><span class="p">;</span>
             <span class="k">if</span> <span class="p">(</span><span class="nx">protoProps</span> <span class="o">&amp;&amp;</span> <span class="nx">protoProps</span><span class="p">.</span><span class="nx">mixins</span><span class="p">)</span> <span class="p">{</span>
                 <span class="nx">mixins</span> <span class="o">=</span> <span class="nx">protoProps</span><span class="p">.</span><span class="nx">mixins</span><span class="p">;</span>
                 <span class="k">delete</span> <span class="nx">cleanProtoProps</span><span class="p">.</span><span class="nx">mixins</span><span class="p">;</span>
             <span class="nx">child</span><span class="p">.</span><span class="nx">extend</span> <span class="o">=</span> <span class="nx">newExtend</span><span class="p">;</span>
             <span class="k">return</span> <span class="nx">child</span><span class="p">;</span>
         <span class="p">};</span>
-    <span class="p">}</span></pre></div>             </td>           </tr>                               <tr id="section-22">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-22">&#182;</a>               </div>               <p>Overrides Backbone's <code>get</code> and <code>set</code> methods to validate that the attribute being get / set is a namedAttribute.</p>             </td>             <td class="code">               <div class="highlight"><pre>    <span class="kd">function</span> <span class="nx">overrideSetGet</span><span class="p">(</span><span class="nx">ctor</span><span class="p">,</span> <span class="nx">childCtor</span><span class="p">)</span> <span class="p">{</span>
+    <span class="p">}</span></pre></div>             </td>           </tr>                               <tr id="section-21">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-21">&#182;</a>               </div>               <p>Overrides Backbone's <code>get</code> and <code>set</code> methods to validate that the attribute being get / set is a namedAttribute.</p>             </td>             <td class="code">               <div class="highlight"><pre>    <span class="kd">function</span> <span class="nx">overrideSetGet</span><span class="p">(</span><span class="nx">ctor</span><span class="p">,</span> <span class="nx">childCtor</span><span class="p">)</span> <span class="p">{</span>
         <span class="kd">var</span> <span class="nx">proto</span> <span class="o">=</span> <span class="nx">ctor</span><span class="p">.</span><span class="nx">prototype</span><span class="p">;</span>
         <span class="kd">var</span> <span class="nx">childProto</span> <span class="o">=</span> <span class="nx">childCtor</span><span class="p">.</span><span class="nx">prototype</span><span class="p">;</span>
 
         <span class="kd">var</span> <span class="nx">oldSet</span> <span class="o">=</span> <span class="nx">proto</span><span class="p">.</span><span class="nx">set</span><span class="p">;</span>
-        <span class="nx">childProto</span><span class="p">.</span><span class="nx">set</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">key</span><span class="p">,</span> <span class="nx">value</span><span class="p">,</span> <span class="nx">options</span><span class="p">)</span> <span class="p">{</span></pre></div>             </td>           </tr>                               <tr id="section-23">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-23">&#182;</a>               </div>               <p>TODO: has, escape, unset</p>             </td>             <td class="code">               <div class="highlight"><pre>            <span class="kd">var</span> <span class="nx">attrs</span><span class="p">,</span>
+        <span class="nx">childProto</span><span class="p">.</span><span class="nx">set</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">key</span><span class="p">,</span> <span class="nx">value</span><span class="p">,</span> <span class="nx">options</span><span class="p">)</span> <span class="p">{</span></pre></div>             </td>           </tr>                               <tr id="section-22">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-22">&#182;</a>               </div>               <p>TODO: has, escape, unset</p>             </td>             <td class="code">               <div class="highlight"><pre>            <span class="kd">var</span> <span class="nx">attrs</span><span class="p">,</span>
                 <span class="nx">attributes</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">namedAttributes</span><span class="p">;</span>
             <span class="k">if</span> <span class="p">(</span><span class="nx">attributes</span><span class="p">)</span> <span class="p">{</span>
                 <span class="k">if</span> <span class="p">(</span><span class="nx">_</span><span class="p">.</span><span class="nx">isObject</span><span class="p">(</span><span class="nx">key</span><span class="p">)</span> <span class="o">||</span> <span class="nx">key</span> <span class="o">==</span> <span class="kc">null</span><span class="p">)</span> <span class="p">{</span>
             <span class="p">}</span>
             <span class="k">return</span> <span class="nx">oldGet</span><span class="p">.</span><span class="nx">apply</span><span class="p">(</span><span class="k">this</span><span class="p">,</span> <span class="nx">arguments</span><span class="p">);</span>
         <span class="p">};</span>
-    <span class="p">}</span></pre></div>             </td>           </tr>                               <tr id="section-24">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-24">&#182;</a>               </div>               <p>Applies extensions to the given constructor function:</p>
+    <span class="p">}</span></pre></div>             </td>           </tr>                               <tr id="section-23">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-23">&#182;</a>               </div>               <p>Applies extensions to the given constructor function:</p>
 
 <ul>
   <li>Sets `extend` to a method generated by `generateMixinExtend`</li>
         <span class="kd">var</span> <span class="nx">oldExtend</span> <span class="o">=</span> <span class="nx">ctor</span><span class="p">.</span><span class="nx">extend</span><span class="p">;</span>
         <span class="nx">child</span><span class="p">.</span><span class="nx">extend</span> <span class="o">=</span> <span class="nx">generateMixinExtend</span><span class="p">(</span><span class="nx">oldExtend</span><span class="p">);</span>
         <span class="k">return</span> <span class="nx">child</span><span class="p">;</span>
-    <span class="p">}</span></pre></div>             </td>           </tr>                               <tr id="section-25">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-25">&#182;</a>               </div>               <p>Applies extensions to the given constructor function:</p>
+    <span class="p">}</span></pre></div>             </td>           </tr>                               <tr id="section-24">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-24">&#182;</a>               </div>               <p>Applies extensions to the given constructor function:</p>
 
 <ul>
   <li>Sets `extend` to a method generated by `generateMixinExtend`</li>
         <span class="kd">var</span> <span class="nx">child</span> <span class="o">=</span> <span class="nx">applyExtensions</span><span class="p">(</span><span class="nx">ctor</span><span class="p">);</span>
         <span class="nx">overrideSetGet</span><span class="p">(</span><span class="nx">ctor</span><span class="p">,</span> <span class="nx">child</span><span class="p">);</span>
         <span class="k">return</span> <span class="nx">child</span><span class="p">;</span>
-    <span class="p">}</span></pre></div>             </td>           </tr>                               <tr id="section-26">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-26">&#182;</a>               </div>               <p>Extend base Backbone classes</p>             </td>             <td class="code">               <div class="highlight"><pre>    <span class="nx">Brace</span><span class="p">.</span><span class="nx">Model</span> <span class="o">=</span> <span class="nx">applyModelExtensions</span><span class="p">(</span><span class="nx">Backbone</span><span class="p">.</span><span class="nx">Model</span><span class="p">);</span>
+    <span class="p">}</span></pre></div>             </td>           </tr>                               <tr id="section-25">             <td class="docs">               <div class="pilwrap">                 <a class="pilcrow" href="#section-25">&#182;</a>               </div>               <p>Extend base Backbone classes</p>             </td>             <td class="code">               <div class="highlight"><pre>    <span class="nx">Brace</span><span class="p">.</span><span class="nx">Model</span> <span class="o">=</span> <span class="nx">applyModelExtensions</span><span class="p">(</span><span class="nx">Backbone</span><span class="p">.</span><span class="nx">Model</span><span class="p">);</span>
     <span class="nx">Brace</span><span class="p">.</span><span class="nx">Collection</span> <span class="o">=</span> <span class="nx">applyExtensions</span><span class="p">(</span><span class="nx">Backbone</span><span class="p">.</span><span class="nx">Collection</span><span class="p">);</span>
     <span class="nx">Brace</span><span class="p">.</span><span class="nx">View</span> <span class="o">=</span> <span class="nx">applyExtensions</span><span class="p">(</span><span class="nx">Backbone</span><span class="p">.</span><span class="nx">View</span><span class="p">);</span>
     <span class="nx">Brace</span><span class="p">.</span><span class="nx">Router</span> <span class="o">=</span> <span class="nx">applyExtensions</span><span class="p">(</span><span class="nx">Backbone</span><span class="p">.</span><span class="nx">Router</span><span class="p">);</span>
 /*global module:false*/
 module.exports = function(grunt) {
 
-  function strDate(){
-    var now = new Date();
-    return now.getFullYear() + '/' + now.getMonth() + "/" + now.getDate();
+  function now(){
+    var today = new Date();
+    return {
+      today: today.getFullYear() + '/' + today.getMonth() + "/" + today.getDate(),
+      year: today.getFullYear()
+    };
   }
 
   // Project configuration.
   grunt.initConfig({
     meta: {
-      banner: '//     Backbone Brace - ' + strDate() + '\n' +
-        '//     Copyright 2012 Atlassian Software Systems Pty Ltd\n' +
+      banner: '//     Backbone Brace - ' + now().today + '\n' +
+        '//     Copyright ' + now().year + ' Atlassian Software Systems Pty Ltd\n' +
         '//     Licensed under the Apache License, Version 2.0'
     },
     lint: {