From ce500554f74a63d1dd506c42f63eabc5d2bdae83 Mon Sep 17 00:00:00 2001 From: Ilya Mochalov Date: Tue, 25 Aug 2015 02:53:18 +0500 Subject: [PATCH] lodash: changed _.kebabCase() method --- lodash/lodash-tests.ts | 2 ++ lodash/lodash.d.ts | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 00ca144fd2..e62a7cc674 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -1742,7 +1742,9 @@ result = _('fred, barney, & pebbles').escape(); result = _.escapeRegExp('[lodash](https://lodash.com/)'); result = _('[lodash](https://lodash.com/)').escapeRegExp(); +// _.kebabCase result = _.kebabCase('Foo Bar'); +result = _('Foo Bar').kebabCase(); // _.pad result = _.pad('abd'); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 77daeca2a1..ff9e6f3120 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -7587,8 +7587,21 @@ declare module _ { escapeRegExp(): string; } + //_.kebabCase interface LoDashStatic { - kebabCase(str?: string): string; + /** + * Converts string to kebab case. + * @param string The string to convert. + * @return Returns the kebab cased string. + */ + kebabCase(string?: string): string; + } + + interface LoDashWrapper { + /** + * @see _.kebabCase + */ + kebabCase(): string; } interface LoDashStatic {