Skip to content

MauriceButler/simple-pad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#simple-pad

Yet another left and right padding module

API

pad.lpad(value, width[, character])

Left pads the value to the width specified with the character (defaults to '0')

pad.lpad(12, 5); // 00012
pad.lpad(12, 5, 'X'); // XXX12

pad.rpad(value, width[, character])

Right pads the value to the width specified with the character (defaults to '0')

pad.rpad(12, 5); // 12000
pad.rpad(12, 5, 'X'); // 12XXX

About

Yet another left and right padding module

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published