more work

This commit is contained in:
Dobie Wollert
2015-04-20 05:31:12 -04:00
parent 397b828024
commit 411ee25a5e
456 changed files with 37079 additions and 109 deletions

31
node_modules/lodash/internal/createPadding.js generated vendored Normal file
View File

@ -0,0 +1,31 @@
var repeat = require('../string/repeat');
/** Native method references. */
var ceil = Math.ceil;
/* Native method references for those with the same name as other `lodash` methods. */
var nativeIsFinite = global.isFinite;
/**
* Creates the padding required for `string` based on the given `length`.
* The `chars` string is truncated if the number of characters exceeds `length`.
*
* @private
* @param {string} string The string to create padding for.
* @param {number} [length=0] The padding length.
* @param {string} [chars=' '] The string used as padding.
* @returns {string} Returns the pad for `string`.
*/
function createPadding(string, length, chars) {
var strLength = string.length;
length = +length;
if (strLength >= length || !nativeIsFinite(length)) {
return '';
}
var padLength = length - strLength;
chars = chars == null ? ' ' : (chars + '');
return repeat(chars, ceil(padLength / chars.length)).slice(0, padLength);
}
module.exports = createPadding;