harvesthq/tick — pull request #11 by aaronholla (2014-05-11 01:40:12+00:00)
Title: Added minlength option for leading zeros

[This Issue](https://github.com/harvesthq/tick/issues/8) was closed but i recently felt the need for exactly this functionality. The response to this issue was that if wouldn't be possible because of the max value would stop the timer if the value hit the max. But it is possible if you think of it from a minimum instead of maximum.

Heres my solution I added an optional minlength value that would default to 1. Then on each render added a check to see if the number of digits is below the min if so it will add leading zeros. If the value is larger then the minlength it will still continue on ticking. It would only add leading zeros if it is needed.

This is useful when your making a clock or a minutes ticker in a timer. For example `8:04` if you had a ticker on the minutes it would be `8:4`. It is like this because of the Number() function used to get the value, it strips away any leading zeros.

To give a few examples with a minlength of `2` :
* Value of `4`, it will add a leading zero to make it `04`.
* Value of `15`, will not add zeros will stay `15`
* Value of `350`, also will not add zeros stays `350`