From 49764af96088728b7ab328bd3ec397e151978a19 Mon Sep 17 00:00:00 2001 From: Sander Pick Date: Sun, 5 Nov 2017 09:41:50 -0800 Subject: [PATCH] Add cleanDiacritics method --- types/underscore.string/index.d.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/types/underscore.string/index.d.ts b/types/underscore.string/index.d.ts index c173dfbfa5..2d067679d5 100644 --- a/types/underscore.string/index.d.ts +++ b/types/underscore.string/index.d.ts @@ -91,6 +91,13 @@ declare module 'underscore' { */ clean(str: string): string; + /** + * Replace diacritic characters with closest ASCII equivalents. + * cleanDiacritics('ääkkönen') => 'aakkonen' + * @param str + */ + cleanDiacritics(str: string): string; + /** * Count occurences of a sub string. * ('Hello world', 'l') => 3