Sha256: 522008356f775238137b19940e863af4f4052796567317ebcdad3d7f71ce613e
Contents?: true
Size: 548 Bytes
Versions: 1
Compression:
Stored size: 548 Bytes
Contents
function addSpaces(v) { return v.split('\n').map(function(vv) { return ' ' + vv; }).join('\n'); } function pad(str, value, filler) { str = String(str) var isRight = false; if(value < 0) { isRight = true; value = -value; } if(str.length < value) { var padding = new Array(value - str.length + 1).join(filler); return isRight ? str + padding : padding + str; } else{ return str; } } module.exports = { addSpaces: addSpaces, pad: pad, pad0: function(str, value) { return pad(str, value, '0'); } };
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
stylus-source-0.54.5 | vendor/node_modules/should-format/util.js |