Remove coercion method use.

This commit is contained in:
John-David Dalton
2017-03-13 20:49:45 -07:00
parent 2f281c68b0
commit bb7c959479
33 changed files with 59 additions and 194 deletions

View File

@@ -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)