mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 01:47:48 +00:00
Remove coercion method use.
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import createPadding from './.internal/createPadding.js'
|
||||
import stringSize from './.internal/stringSize.js'
|
||||
import toInteger from './toInteger.js'
|
||||
import toString from './toString.js'
|
||||
|
||||
/**
|
||||
* Pads `string` on the right side if it's shorter than `length`. Padding
|
||||
@@ -25,9 +23,6 @@ import toString from './toString.js'
|
||||
* // => 'abc'
|
||||
*/
|
||||
function padEnd(string, length, chars) {
|
||||
string = toString(string)
|
||||
length = toInteger(length)
|
||||
|
||||
const strLength = length ? stringSize(string) : 0
|
||||
return (length && strLength < length)
|
||||
? (string + createPadding(length - strLength, chars))
|
||||
|
||||
Reference in New Issue
Block a user