added _.escape definition

This commit is contained in:
Brian Zengel
2013-10-20 18:09:31 -04:00
parent 65f1bc10d3
commit 0f2cffa18e
2 changed files with 22 additions and 23 deletions
+1
View File
@@ -712,6 +712,7 @@ result = <any[]>_.values({ 'one': 1, 'two': 2, 'three': 3 });
* Utilities *
***********/
result = <string>_.escape('Moe, Larry & Curly');
//////////////////////////////////////////////////////////////////////////////////////////////////
+21 -23
View File
@@ -2703,26 +2703,29 @@ declare module _ {
**/
export function values(object: any): any[];
/* *********
* Utility *
* Utilities *
********** */
/**
* Converts the characters &, <, >, ", and ' in string to their corresponding HTML entities.
* @param string The string to escape.
* @return The escaped string.
**/
export function escape(str: string): string;
/**
* Give control of the "_" variable back to its previous owner.
* Returns a reference to the Lo-Dash object.
@@ -2783,12 +2786,7 @@ declare module _ {
**/
export function uniqueId(): number;
/**
* Escapes a string for insertion into HTML, replacing &, <, >, ", ', and / characters.
* @param str Raw string to escape.
* @return `str` HTML escaped.
**/
export function escape(str: string): string;
/**
* If the value of the named property is a function then invoke it; otherwise, return it.