diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 2cbec6853..c8b386a7e 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -1683,7 +1683,12 @@ result = _.snakeCase('Foo Bar'); result = _('Foo Bar').snakeCase(); result = _.startCase('--foo-bar'); + +// _.startsWith result = _.startsWith('abc', 'a'); +result = _.startsWith('abc', 'a', 1); +result = _('abc').startsWith('a'); +result = _('abc').startsWith('a', 1); // _.trim result = _.trim(); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index c088f5459..ecbcc05f2 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -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 { + /** + * @see _.startsWith + */ + startsWith(target?: string, position?: number): boolean; } //_.trim