"utilb".split("").reverse().join("")
A small package of JavaScript utilities I find myself writing over and over.
- Shuffle arrays
- Pick one item from an array (with the ability to set a weight)
- Random number from range
- Random number of a set number of digits
- Benchmark functions
- Pad numbers and text
- Format Date objects in MM/DD/YYYY format
- Format raw number of seconds to a string of seconds, minutes, and hours with a leading "0" pad if needed
- Numeric sort to order numbers to overcome the way the built in Array.sort() converts numbers to strings