sivy/node-statsd — pull request #26 by devdazed (2013-02-04 15:31:42+00:00)
Title: Refactored and added a few useful features.

I refactored and cleaned everything up. I also added a couple useful features.

* Ensured there were no more global memory leaks
* Added defaults to the initializer variables. The default host is `localhost` and the default port is `8125`
* Added prefix and suffix to class to allow users to specify what the name of each stat will start and end with. This allows for things like `...` and other templates.
* Added a globalize function that gives the user the option to make this instance of statsd global
* Standardized all functions to take a `stat`, `value`, `sampleRate` (optional), and `callback` (optional)
* Added an optional `callback` to each of the functions that will get called when the message is successfully sent
* Standardized on camel case in accordance with the JS recommended style guide
* Added a default value of `1` for increments and `-1` for decrements
* Added an alias of `unique` to `set` as set is rather ambiguous
* Removed `mersenne` dependency as V8s `Math.random()` is faster and still provides an even distribution. For sampling purposes this is sufficient, we don't need cryptographic security or seeds here.
* Added full JSDoc style comments to all methods.