Update helpers.js

Added a padding function to add leading characters