mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
added _.escape definition
This commit is contained in:
@@ -712,6 +712,7 @@ result = <any[]>_.values({ 'one': 1, 'two': 2, 'three': 3 });
|
||||
* Utilities *
|
||||
***********/
|
||||
|
||||
result = <string>_.escape('Moe, Larry & Curly');
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
Vendored
+21
-23
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user