lodash: changed _.snakeCase() method

This commit is contained in:
Ilya Mochalov
2015-08-17 04:45:08 +05:00
parent 5109e1269d
commit 36cd7e5ddf
2 changed files with 23 additions and 1 deletions
+3
View File
@@ -1561,7 +1561,10 @@ result = <number>_.parseInt('08', 10);
result = <number>_('08').parseInt();
result = <number>_('08').parseInt(10);
// _.snakeCase
result = <string>_.snakeCase('Foo Bar');
result = <string>_('Foo Bar').snakeCase();
result = <string>_.startCase('--foo-bar');
result = <boolean>_.startsWith('abc', 'a');
+20 -1
View File
@@ -7212,7 +7212,26 @@ declare module _ {
interface LoDashStatic {
repeat(str?: string, n?: number): string;
snakeCase(str?: string): string;
}
//_.snakeCase
interface LoDashStatic {
/**
* Converts string to snake case.
* @param string The string to convert.
* @return Returns the snake cased string.
*/
snakeCase(string?: string): string;
}
interface LoDashWrapper<T> {
/**
* @see _.snakeCase
*/
snakeCase(): string;
}
interface LoDashStatic {
startCase(str?: string): string;
startsWith(str?: string, target?: string, position?: number): boolean;
}