pad
Advanced tools
Comparing version 1.0.3 to 1.1.0
// Generated by CoffeeScript 1.11.1 | ||
module.exports = function(text, length, options) { | ||
var escapecolor, i, invert, j, pad, padlength, ref, ref1; | ||
var escapecolor, invert, pad, padlength, ref; | ||
if (options == null) { | ||
@@ -39,5 +39,3 @@ options = {}; | ||
} | ||
for (i = j = 0, ref1 = padlength; 0 <= ref1 ? j < ref1 : j > ref1; i = 0 <= ref1 ? ++j : --j) { | ||
pad += options.char; | ||
} | ||
pad += options.char.repeat(padlength); | ||
if (invert) { | ||
@@ -44,0 +42,0 @@ return pad + text; |
{ | ||
"name": "pad", | ||
"description": "Left and right string padding", | ||
"version": "1.0.3", | ||
"version": "1.1.0", | ||
"author": "David Worms <david@adaltas.com>", | ||
@@ -18,3 +18,3 @@ "contributors": [ | ||
"engines": { | ||
"node": ">= 0.4.0" | ||
"node": ">= 4.0.0" | ||
}, | ||
@@ -21,0 +21,0 @@ "homepage": "https://github.com/adaltas/node-pad", |
@@ -53,2 +53,4 @@ | ||
Starting with version 1.1.0, Node pad rely on Node.js 4.0.0 or more recent. Stick to version 1.0.x if using an older version of Node.js. | ||
Via [npm](http://github.com/isaacs/npm): | ||
@@ -55,0 +57,0 @@ |
5806
76
66