<spanclass="p">};</span></pre></div></td></tr><trid="section-3"><tdclass="docs"><divclass="pilwrap"><aclass="pilcrow"href="#section-3">¶</a></div><h3>function get (key)</h3>
<h4>@key {string} Key to retrieve for this instance.</h4>
<p>Retrieves the value for the specified key (if any).</p></td><tdclass="code"><divclass="highlight"><pre><spanclass="nx">Memory</span><spanclass="p">.</span><spanclass="nx">prototype</span><spanclass="p">.</span><spanclass="nx">get</span><spanclass="o">=</span><spanclass="kd">function</span><spanclass="p">(</span><spanclass="nx">key</span><spanclass="p">)</span><spanclass="p">{</span>
<spanclass="nx">path</span><spanclass="o">=</span><spanclass="nx">nconf</span><spanclass="p">.</span><spanclass="nx">path</span><spanclass="p">(</span><spanclass="nx">key</span><spanclass="p">);</span></pre></div></td></tr><trid="section-4"><tdclass="docs"><divclass="pilwrap"><aclass="pilcrow"href="#section-4">¶</a></div><p>Scope into the object to get the appropriate nested context</p></td><tdclass="code"><divclass="highlight"><pre><spanclass="k">while</span><spanclass="p">(</span><spanclass="nx">path</span><spanclass="p">.</span><spanclass="nx">length</span><spanclass="o">></span><spanclass="mi">0</span><spanclass="p">)</span><spanclass="p">{</span>
<spanclass="p">};</span></pre></div></td></tr><trid="section-5"><tdclass="docs"><divclass="pilwrap"><aclass="pilcrow"href="#section-5">¶</a></div><h3>function set (key, value)</h3>
<h4>@key {string} Key to set in this instance</h4>
<h4>@value {literal|Object} Value for the specified key</h4>
<p>Sets the <code>value</code> for the specified <code>key</code> in this instance.</p></td><tdclass="code"><divclass="highlight"><pre><spanclass="nx">Memory</span><spanclass="p">.</span><spanclass="nx">prototype</span><spanclass="p">.</span><spanclass="nx">set</span><spanclass="o">=</span><spanclass="kd">function</span><spanclass="p">(</span><spanclass="nx">key</span><spanclass="p">,</span><spanclass="nx">value</span><spanclass="p">)</span><spanclass="p">{</span>
</pre></div></td></tr><trid="section-6"><tdclass="docs"><divclass="pilwrap"><aclass="pilcrow"href="#section-6">¶</a></div><p>Update the <code>mtime</code> (modified time) of the key</p></td><tdclass="code"><divclass="highlight"><pre><spanclass="k">this</span><spanclass="p">.</span><spanclass="nx">mtimes</span><spanclass="p">[</span><spanclass="nx">key</span><spanclass="p">]</span><spanclass="o">=</span><spanclass="nb">Date</span><spanclass="p">.</span><spanclass="nx">now</span><spanclass="p">();</span>
</pre></div></td></tr><trid="section-7"><tdclass="docs"><divclass="pilwrap"><aclass="pilcrow"href="#section-7">¶</a></div><p>Scope into the object to get the appropriate nested context</p></td><tdclass="code"><divclass="highlight"><pre><spanclass="k">while</span><spanclass="p">(</span><spanclass="nx">path</span><spanclass="p">.</span><spanclass="nx">length</span><spanclass="o">></span><spanclass="mi">1</span><spanclass="p">)</span><spanclass="p">{</span>
</pre></div></td></tr><trid="section-8"><tdclass="docs"><divclass="pilwrap"><aclass="pilcrow"href="#section-8">¶</a></div><p>Set the specified value in the nested JSON structure</p></td><tdclass="code"><divclass="highlight"><pre><spanclass="nx">key</span><spanclass="o">=</span><spanclass="nx">path</span><spanclass="p">.</span><spanclass="nx">shift</span><spanclass="p">();</span>
<h4>@key {string} Key to remove from this instance</h4>
<p>Removes the value for the specified <code>key</code> from this instance.</p></td><tdclass="code"><divclass="highlight"><pre><spanclass="nx">Memory</span><spanclass="p">.</span><spanclass="nx">prototype</span><spanclass="p">.</span><spanclass="nx">clear</span><spanclass="o">=</span><spanclass="kd">function</span><spanclass="p">(</span><spanclass="nx">key</span><spanclass="p">)</span><spanclass="p">{</span>
</pre></div></td></tr><trid="section-10"><tdclass="docs"><divclass="pilwrap"><aclass="pilcrow"href="#section-10">¶</a></div><p>Remove the key from the set of <code>mtimes</code> (modified times)</p></td><tdclass="code"><divclass="highlight"><pre><spanclass="k">delete</span><spanclass="k">this</span><spanclass="p">.</span><spanclass="nx">mtimes</span><spanclass="p">[</span><spanclass="nx">key</span><spanclass="p">];</span>
</pre></div></td></tr><trid="section-11"><tdclass="docs"><divclass="pilwrap"><aclass="pilcrow"href="#section-11">¶</a></div><p>Scope into the object to get the appropriate nested context</p></td><tdclass="code"><divclass="highlight"><pre><spanclass="k">while</span><spanclass="p">(</span><spanclass="nx">path</span><spanclass="p">.</span><spanclass="nx">length</span><spanclass="o">></span><spanclass="mi">1</span><spanclass="p">)</span><spanclass="p">{</span>
</pre></div></td></tr><trid="section-12"><tdclass="docs"><divclass="pilwrap"><aclass="pilcrow"href="#section-12">¶</a></div><p>Delete the key from the nested JSON structure</p></td><tdclass="code"><divclass="highlight"><pre><spanclass="nx">key</span><spanclass="o">=</span><spanclass="nx">path</span><spanclass="p">.</span><spanclass="nx">shift</span><spanclass="p">();</span>
<h4>@key {string} Key to merge the value into</h4>
<h4>@value {literal|Object} Value to merge into the key</h4>
<p>Merges the properties in <code>value</code> into the existing object value
at <code>key</code>. If the existing value <code>key</code> is not an Object, it will be
completely overwritten.</p></td><tdclass="code"><divclass="highlight"><pre><spanclass="nx">Memory</span><spanclass="p">.</span><spanclass="nx">prototype</span><spanclass="p">.</span><spanclass="nx">merge</span><spanclass="o">=</span><spanclass="kd">function</span><spanclass="p">(</span><spanclass="nx">key</span><spanclass="p">,</span><spanclass="nx">value</span><spanclass="p">)</span><spanclass="p">{</span></pre></div></td></tr><trid="section-14"><tdclass="docs"><divclass="pilwrap"><aclass="pilcrow"href="#section-14">¶</a></div><p>If the key is not an <code>Object</code> or is an <code>Array</code>,
then simply set it. Merging is for Objects.</p></td><tdclass="code"><divclass="highlight"><pre><spanclass="k">if</span><spanclass="p">(</span><spanclass="k">typeof</span><spanclass="nx">value</span><spanclass="o">!==</span><spanclass="s1">'object'</span><spanclass="o">||</span><spanclass="nb">Array</span><spanclass="p">.</span><spanclass="nx">isArray</span><spanclass="p">(</span><spanclass="nx">value</span><spanclass="p">))</span><spanclass="p">{</span>
</pre></div></td></tr><trid="section-15"><tdclass="docs"><divclass="pilwrap"><aclass="pilcrow"href="#section-15">¶</a></div><p>Update the <code>mtime</code> (modified time) of the key</p></td><tdclass="code"><divclass="highlight"><pre><spanclass="k">this</span><spanclass="p">.</span><spanclass="nx">mtimes</span><spanclass="p">[</span><spanclass="nx">key</span><spanclass="p">]</span><spanclass="o">=</span><spanclass="nb">Date</span><spanclass="p">.</span><spanclass="nx">now</span><spanclass="p">();</span>
</pre></div></td></tr><trid="section-16"><tdclass="docs"><divclass="pilwrap"><aclass="pilcrow"href="#section-16">¶</a></div><p>Scope into the object to get the appropriate nested context</p></td><tdclass="code"><divclass="highlight"><pre><spanclass="k">while</span><spanclass="p">(</span><spanclass="nx">path</span><spanclass="p">.</span><spanclass="nx">length</span><spanclass="o">></span><spanclass="mi">1</span><spanclass="p">)</span><spanclass="p">{</span>
<spanclass="p">}</span></pre></div></td></tr><trid="section-17"><tdclass="docs"><divclass="pilwrap"><aclass="pilcrow"href="#section-17">¶</a></div><p>Set the specified value in the nested JSON structure</p></td><tdclass="code"><divclass="highlight"><pre><spanclass="nx">key</span><spanclass="o">=</span><spanclass="nx">path</span><spanclass="p">.</span><spanclass="nx">shift</span><spanclass="p">();</span>
</pre></div></td></tr><trid="section-18"><tdclass="docs"><divclass="pilwrap"><aclass="pilcrow"href="#section-18">¶</a></div><p>If the current value at the key target is not an <code>Object</code>,
is an Object.</p></td><tdclass="code"><divclass="highlight"><pre><spanclass="k">if</span><spanclass="p">(</span><spanclass="k">typeof</span><spanclass="nx">target</span><spanclass="p">[</span><spanclass="nx">key</span><spanclass="p">]</span><spanclass="o">!==</span><spanclass="s1">'object'</span><spanclass="o">||</span><spanclass="nb">Array</span><spanclass="p">.</span><spanclass="nx">isArray</span><spanclass="p">(</span><spanclass="nx">target</span><spanclass="p">[</span><spanclass="nx">key</span><spanclass="p">]))</span><spanclass="p">{</span>
<p>Clears all keys associated with this instance.</p></td><tdclass="code"><divclass="highlight"><pre><spanclass="nx">Memory</span><spanclass="p">.</span><spanclass="nx">prototype</span><spanclass="p">.</span><spanclass="nx">reset</span><spanclass="o">=</span><spanclass="kd">function</span><spanclass="p">()</span><spanclass="p">{</span>