From 8f3167dc9f512956db10a3ba4524978f64d1aeac Mon Sep 17 00:00:00 2001 From: Ilya Mochalov Date: Thu, 20 Aug 2015 01:20:35 +0500 Subject: [PATCH] lodash: changed _.deburr() method --- lodash/lodash-tests.ts | 4 ++++ lodash/lodash.d.ts | 22 +++++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 2cbec6853..c3e378c11 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -1652,7 +1652,11 @@ result = _.uniqueId(); result = _.camelCase('Foo Bar'); result = _.capitalize('fred'); + +// _.deburr result = _.deburr('déjà vu'); +result = _('déjà vu').deburr(); + result = _.endsWith('abc', 'c'); // _.escape diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index c088f5459..506c3c47b 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -7441,7 +7441,27 @@ declare module _ { interface LoDashStatic { camelCase(str?: string): string; capitalize(str?: string): string; - deburr(str?: string): string; + } + + //_.deburr + interface LoDashStatic { + /** + * Deburrs string by converting latin-1 supplementary letters to basic latin letters and removing combining + * diacritical marks. + * @param string The string to deburr. + * @return Returns the deburred string. + */ + deburr(string?: string): string; + } + + interface LoDashWrapper { + /** + * @see _.deburr + */ + deburr(): string; + } + + interface LoDashStatic { endsWith(str?: string, target?: string, position?: number): boolean; }