mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 18:37:50 +00:00
Fixes #360, documenting _.escape.
This commit is contained in:
12
index.html
12
index.html
@@ -192,7 +192,7 @@
|
|||||||
<span class="methods"><a href="#noConflict">noConflict</a>,
|
<span class="methods"><a href="#noConflict">noConflict</a>,
|
||||||
<a href="#identity">identity</a>, <a href="#times">times</a>,
|
<a href="#identity">identity</a>, <a href="#times">times</a>,
|
||||||
<a href="#mixin">mixin</a>, <a href="#uniqueId">uniqueId</a>,
|
<a href="#mixin">mixin</a>, <a href="#uniqueId">uniqueId</a>,
|
||||||
<a href="#template">template</a></span>
|
<a href="#escape">escape</a>, <a href="#template">template</a></span>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -1183,6 +1183,16 @@ _("fabio").capitalize();
|
|||||||
_.uniqueId('contact_');
|
_.uniqueId('contact_');
|
||||||
=> 'contact_104'</pre>
|
=> 'contact_104'</pre>
|
||||||
|
|
||||||
|
<p id="escape">
|
||||||
|
<b class="header">escape</b><code>_.escape(string)</code>
|
||||||
|
<br />
|
||||||
|
Escapes a string for insertion into HTML, replacing
|
||||||
|
<tt>&</tt>, <tt><</tt>, <tt>></tt>, <tt>"</tt>, <tt>'</tt>, and <tt>/</tt> characters.
|
||||||
|
</p>
|
||||||
|
<pre>
|
||||||
|
_.escape('Curly, Larry & Moe');
|
||||||
|
=> "Curly, Larry &amp; Moe"</pre>
|
||||||
|
|
||||||
<p id="template">
|
<p id="template">
|
||||||
<b class="header">template</b><code>_.template(templateString, [context])</code>
|
<b class="header">template</b><code>_.template(templateString, [context])</code>
|
||||||
<br />
|
<br />
|
||||||
|
|||||||
Reference in New Issue
Block a user