mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 17:37:50 +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 left side if it's shorter than `length`. Padding
|
||||
@@ -25,9 +23,6 @@ import toString from './toString.js'
|
||||
* // => 'abc'
|
||||
*/
|
||||
function padStart(string, length, chars) {
|
||||
string = toString(string)
|
||||
length = toInteger(length)
|
||||
|
||||
const strLength = length ? stringSize(string) : 0
|
||||
return (length && strLength < length)
|
||||
? (createPadding(length - strLength, chars) + string)
|
||||
|
||||
Reference in New Issue
Block a user