annostring
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -5,3 +5,6 @@ var annotate = require('annotate'); | ||
module.exports = annotate('fill', 'Uses given `amount` of `chr` to fill `str` beginning'). | ||
var fill = annotate('fill', 'Uses given `amount` of `chr` to fill `str` beginning'). | ||
on(is.number, is.character, is.number, function(amount, chr, num) { | ||
return fill(amount, chr, num.toString()); | ||
}). | ||
on(is.number, is.character, is.string, function(amount, chr, str) { | ||
@@ -11,3 +14,3 @@ var pad = ''; | ||
if(!chr || amount < 1 || len < 1 || len > 1000) return str; | ||
if(!chr || amount < 1 || len < 1 || len > 1000) return str; | ||
@@ -21,1 +24,4 @@ while(pad.length < len) { | ||
satisfies(is.string); | ||
module.exports = fill; | ||
@@ -5,3 +5,3 @@ { | ||
"author": "Juho Vepsalainen <bebraw@gmail.com>", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"dependencies": { | ||
@@ -8,0 +8,0 @@ "annois": "0.3.0", |
11814
35
266