MCPcopy Index your code
hub / github.com/deployd/deployd / padEnd

Function padEnd

test-app/public/sinon.js:25036–25044  ·  view source on GitHub ↗

* Pads `string` on the right side if it's shorter than `length`. Padding * characters are truncated if they exceed `length`. * * @static * @memberOf _ * @since 4.0.0 * @category String * @param {string} [string=''] The string to pad.

(string, length, chars)

Source from the content-addressed store, hash-verified

25034 * // => 'abc'
25035 */
25036 function padEnd(string, length, chars) {
25037 string = toString(string);
25038 length = toInteger(length);
25039
25040 var strLength = length ? stringSize(string) : 0;
25041 return (length && strLength < length)
25042 ? (string + createPadding(length - strLength, chars))
25043 : string;
25044 }
25045
25046 /**
25047 * Pads `string` on the left side if it's shorter than `length`. Padding

Callers

nothing calls this directly

Calls 4

toIntegerFunction · 0.85
stringSizeFunction · 0.85
createPaddingFunction · 0.85
toStringFunction · 0.70

Tested by

no test coverage detected