(feature) Renamed _.padLeft & _.padRight to _.padStart & _.padEnd

This commit is contained in:
DomiR
2016-01-13 18:59:53 +01:00
parent 95514890d6
commit 6c45e1efa3
2 changed files with 35 additions and 37 deletions

View File

@@ -9010,49 +9010,49 @@ module TestPad {
}
}
// _.padLeft
module TestPadLeft {
// _.padStart
module TestPadStart {
{
let result: string;
result = _.padLeft('abc');
result = _.padLeft('abc', 6);
result = _.padLeft('abc', 6, '_-');
result = _.padStart('abc');
result = _.padStart('abc', 6);
result = _.padStart('abc', 6, '_-');
result = _('abc').padLeft();
result = _('abc').padLeft(6);
result = _('abc').padLeft(6, '_-');
result = _('abc').padStart();
result = _('abc').padStart(6);
result = _('abc').padStart(6, '_-');
}
{
let result: _.LoDashExplicitWrapper<string>;
result = _('abc').chain().padLeft();
result = _('abc').chain().padLeft(6);
result = _('abc').chain().padLeft(6, '_-');
result = _('abc').chain().padStart();
result = _('abc').chain().padStart(6);
result = _('abc').chain().padStart(6, '_-');
}
}
// _.padRight
module TestPadRight {
// _.padEnd
module TestPadEnd {
{
let result: string;
result = _.padRight('abc');
result = _.padRight('abc', 6);
result = _.padRight('abc', 6, '_-');
result = _.padEnd('abc');
result = _.padEnd('abc', 6);
result = _.padEnd('abc', 6, '_-');
result = _('abc').padRight();
result = _('abc').padRight(6);
result = _('abc').padRight(6, '_-');
result = _('abc').padEnd();
result = _('abc').padEnd(6);
result = _('abc').padEnd(6, '_-');
}
{
let result: _.LoDashExplicitWrapper<string>;
result = _('abc').chain().padRight();
result = _('abc').chain().padRight(6);
result = _('abc').chain().padRight(6, '_-');
result = _('abc').chain().padEnd();
result = _('abc').chain().padEnd(6);
result = _('abc').chain().padEnd(6, '_-');
}
}

28
lodash/lodash.d.ts vendored
View File

@@ -9,9 +9,7 @@
TODO:
- [ ] Made _.forEach, _.forIn, _.forOwn, & _.times implicitly end a chain sequence
- [ ] Removed _.pluck in favor of _.map with iteratee shorthand
- [ ] Removed thisArg params from most methods
- [ ] Split _.max & _.min into _.maxBy & _.minBy
- [x] Removed _.support
- [x] Removed _.findWhere in favor of _.find with iteratee shorthand
@@ -22,7 +20,7 @@ TODO:
- [x] Renamed _.indexBy to _.keyBy
- [x] Renamed _.invoke to _.invokeMap
- [x] Renamed _.overArgs to _.overArgs
- [ ] Renamed _.padLeft & _.padRight to _.padStart & _.padEnd
- [x] Renamed _.padLeft & _.padRight to _.padStart & _.padEnd
- [ ] Renamed _.pairs to _.toPairs
- [ ] Renamed _.rest to _.tail
- [ ] Renamed _.restParam to _.rest
@@ -13805,7 +13803,7 @@ declare module _ {
): LoDashExplicitWrapper<string>;
}
//_.padLeft
//_.padStart
interface LoDashStatic {
/**
* Pads string on the left side if its shorter than length. Padding characters are truncated if they exceed
@@ -13816,7 +13814,7 @@ declare module _ {
* @param chars The string used as padding.
* @return Returns the padded string.
*/
padLeft(
padStart(
string?: string,
length?: number,
chars?: string
@@ -13825,9 +13823,9 @@ declare module _ {
interface LoDashImplicitWrapper<T> {
/**
* @see _.padLeft
* @see _.padStart
*/
padLeft(
padStart(
length?: number,
chars?: string
): string;
@@ -13835,15 +13833,15 @@ declare module _ {
interface LoDashExplicitWrapper<T> {
/**
* @see _.padLeft
* @see _.padStart
*/
padLeft(
padStart(
length?: number,
chars?: string
): LoDashExplicitWrapper<string>;
}
//_.padRight
//_.padEnd
interface LoDashStatic {
/**
* Pads string on the right side if its shorter than length. Padding characters are truncated if they exceed
@@ -13854,7 +13852,7 @@ declare module _ {
* @param chars The string used as padding.
* @return Returns the padded string.
*/
padRight(
padEnd(
string?: string,
length?: number,
chars?: string
@@ -13863,9 +13861,9 @@ declare module _ {
interface LoDashImplicitWrapper<T> {
/**
* @see _.padRight
* @see _.padEnd
*/
padRight(
padEnd(
length?: number,
chars?: string
): string;
@@ -13873,9 +13871,9 @@ declare module _ {
interface LoDashExplicitWrapper<T> {
/**
* @see _.padRight
* @see _.padEnd
*/
padRight(
padEnd(
length?: number,
chars?: string
): LoDashExplicitWrapper<string>;