diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 5e1a7c84b..b532dc018 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -712,6 +712,7 @@ result = _.values({ 'one': 1, 'two': 2, 'three': 3 }); * Utilities * ***********/ +result = _.escape('Moe, Larry & Curly'); ////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 8745f4c0b..e479d0bc2 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -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.