/padder

Pad strings in different ways

Primary LanguageJavaScript

Padder

npm install padder
var pad = require('padder');

pad.zero(1); // 01
pad.zero(1, 4); // 0001

pad.space('foobar'); // '                     foobar'
pad.timestamp(); // 2014-07-23 16:42:18