From 63157c261eca23f05555ae57ee53a49203aacf41 Mon Sep 17 00:00:00 2001 From: DomiR Date: Wed, 13 Jan 2016 19:07:06 +0100 Subject: [PATCH] (feature) Renamed _.trimLeft & _.trimRight to _.trimStart & _.trimEnd --- lodash/lodash-tests.ts | 37 ++++++++++++++++++------------------- lodash/lodash.d.ts | 26 +++++++++++++------------- 2 files changed, 31 insertions(+), 32 deletions(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index d0d3c94aa..d2ef64326 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -9203,46 +9203,45 @@ module TestTrim { } } -// _.trimLeft -module TestTrimLeft { +// _.trimStart +module TestTrimStart { { let result: string; - result = _.trimLeft(); - result = _.trimLeft(' abc '); - result = _.trimLeft('-_-abc-_-', '_-'); + result = _.trimStart(); + result = _.trimStart(' abc '); + result = _.trimStart('-_-abc-_-', '_-'); - result = _('-_-abc-_-').trimLeft(); - result = _('-_-abc-_-').trimLeft('_-'); + result = _('-_-abc-_-').trimStart(); + result = _('-_-abc-_-').trimStart('_-'); } { let result: _.LoDashExplicitWrapper; - result = _('-_-abc-_-').chain().trimLeft(); - result = _('-_-abc-_-').chain().trimLeft('_-'); + result = _('-_-abc-_-').chain().trimStart(); + result = _('-_-abc-_-').chain().trimStart('_-'); } } -// _.trimRight - -module TestTrimRight { +// _.trimEnd +module TestTrimEnd { { let result: string; - result = _.trimRight(); - result = _.trimRight(' abc '); - result = _.trimRight('-_-abc-_-', '_-'); + result = _.trimEnd(); + result = _.trimEnd(' abc '); + result = _.trimEnd('-_-abc-_-', '_-'); - result = _('-_-abc-_-').trimRight(); - result = _('-_-abc-_-').trimRight('_-'); + result = _('-_-abc-_-').trimEnd(); + result = _('-_-abc-_-').trimEnd('_-'); } { let result: _.LoDashExplicitWrapper; - result = _('-_-abc-_-').chain().trimRight(); - result = _('-_-abc-_-').chain().trimRight('_-'); + result = _('-_-abc-_-').chain().trimEnd(); + result = _('-_-abc-_-').chain().trimEnd('_-'); } } diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 75bf6baac..e88e628d7 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -25,7 +25,7 @@ TODO: - [x] Renamed _.rest to _.tail - [x] Renamed _.restParam to _.rest - [x] Renamed _.sortByOrder to _.orderBy -- [ ] Renamed _.trimLeft & _.trimRight to _.trimStart & _.trimEnd +- [x] Renamed _.trimLeft & _.trimRight to _.trimStart & _.trimEnd - [ ] Renamed _.trunc to _.truncate - [ ] Split _.indexOf & _.lastIndexOf into _.sortedIndexOf & _.sortedLastIndexOf @@ -14116,7 +14116,7 @@ declare module _ { trim(chars?: string): LoDashExplicitWrapper; } - //_.trimLeft + //_.trimStart interface LoDashStatic { /** * Removes leading whitespace or specified characters from string. @@ -14125,7 +14125,7 @@ declare module _ { * @param chars The characters to trim. * @return Returns the trimmed string. */ - trimLeft( + trimStart( string?: string, chars?: string ): string; @@ -14133,19 +14133,19 @@ declare module _ { interface LoDashImplicitWrapper { /** - * @see _.trimLeft + * @see _.trimStart */ - trimLeft(chars?: string): string; + trimStart(chars?: string): string; } interface LoDashExplicitWrapper { /** - * @see _.trimLeft + * @see _.trimStart */ - trimLeft(chars?: string): LoDashExplicitWrapper; + trimStart(chars?: string): LoDashExplicitWrapper; } - //_.trimRight + //_.trimEnd interface LoDashStatic { /** * Removes trailing whitespace or specified characters from string. @@ -14154,7 +14154,7 @@ declare module _ { * @param chars The characters to trim. * @return Returns the trimmed string. */ - trimRight( + trimEnd( string?: string, chars?: string ): string; @@ -14162,16 +14162,16 @@ declare module _ { interface LoDashImplicitWrapper { /** - * @see _.trimRight + * @see _.trimEnd */ - trimRight(chars?: string): string; + trimEnd(chars?: string): string; } interface LoDashExplicitWrapper { /** - * @see _.trimRight + * @see _.trimEnd */ - trimRight(chars?: string): LoDashExplicitWrapper; + trimEnd(chars?: string): LoDashExplicitWrapper; } //_.trunc