MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / createPadDir

Function createPadDir

lib/web/jshint.js:4943–4948  ·  view source on GitHub ↗

* Creates a function for `_.padLeft` or `_.padRight`. * * @private * @param {boolean} [fromRight] Specify padding from the right. * @returns {Function} Returns the new pad function.

(fromRight)

Source from the content-addressed store, hash-verified

4941 * @returns {Function} Returns the new pad function.
4942 */
4943 function createPadDir(fromRight) {
4944 return function(string, length, chars) {
4945 string = baseToString(string);
4946 return string && ((fromRight ? string : '') + createPadding(string, length, chars) + (fromRight ? '' : string));
4947 };
4948 }
4949
4950 /**
4951 * Creates a `_.partial` or `_.partialRight` function.

Callers 1

runInContextFunction · 0.85

Calls 2

baseToStringFunction · 0.85
createPaddingFunction · 0.85

Tested by

no test coverage detected