guille/ms.js — pull request #1 by tubalmartin (2012-03-08 03:49:08+00:00)
Title: An even better function

Benefits of my rewrite:
- Smaller footprint (save bytes!!)
- 2.8x better performance

Performance test run:

```
console.time('ms');
for (var i=0; i < 10000; i++) {
ms(100);
ms('100ms');
ms('1.5H');
ms('☃');
}
console.timeEnd('ms');
````
Results:
- Your version finishes in 50ms on average.
- My version finishes in 18ms on average.

Passes all unit tests :)