diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 9cf789a77..8d4b23169 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -1719,7 +1719,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 af33ea9b0..2bdf00691 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -7600,7 +7600,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