lodash: changed _.startsWith() method

This commit is contained in:
Ilya Mochalov
2015-08-20 01:35:01 +05:00
parent bb45306d0f
commit 46dc2e2b3d
2 changed files with 24 additions and 1 deletions
+5
View File
@@ -1683,7 +1683,12 @@ result = <string>_.snakeCase('Foo Bar');
result = <string>_('Foo Bar').snakeCase();
result = <string>_.startCase('--foo-bar');
// _.startsWith
result = <boolean>_.startsWith('abc', 'a');
result = <boolean>_.startsWith('abc', 'a', 1);
result = <boolean>_('abc').startsWith('a');
result = <boolean>_('abc').startsWith('a', 1);
// _.trim
result = <string>_.trim();
+19 -1
View File
@@ -7530,7 +7530,25 @@ declare module _ {
interface LoDashStatic {
startCase(str?: string): string;
startsWith(str?: string, target?: string, position?: number): boolean;
}
//_.startsWith
interface LoDashStatic {
/**
* Checks if string starts with the given target string.
* @param string The string to search.
* @param target The string to search for.
* @param position The position to search from.
* @return Returns true if string starts with target, else false.
*/
startsWith(string?: string, target?: string, position?: number): boolean;
}
interface LoDashWrapper<T> {
/**
* @see _.startsWith
*/
startsWith(target?: string, position?: number): boolean;
}
//_.trim