A module containing extremely commonly used functionality
npm install js-stdlibnpm install js-stdlib. require('js-stdlib').bower install js-stdlib. window.stdlib.* clone - Deep clones any value.
* copy - Shallow copies any value.
* epromise - Extends the native promise with defer, and callback conversion
functions.
* extend - Extends objects with values from other objects.
* format - Provides .NET like string formatting.
* regex - Provides regex string encoding and decoding.
* typeof - Provides an extended typeof function.
#### clone.register()
Adds the clone function to Object.prototype.
#### clone.deregister()
Removes the clone function from Object.prototype.
#### copy.register()
Adds the copy function to Object.prototype.
#### copy.deregister()
Removes the copy function from Object.prototype.
#### Promise.defer()
Returns an object containing the promise, as well as resolve, reject andnotify functions.
#### Promise.callback([context], func, arg1, arg2, arg3)
Calls a function with the supplied context and arguments, and supplied an
additional function callback which will resolve or reject the promise returned
from the function.
#### promise.then(onResolved, onRejected, onNotified)
The onNotified function is added as a possible argument to the then function.
This function will be called when the executor notify function us called.
#### promise.notify(onNotified)
The function adds a handler to be called when a notification has been received.
#### promise.callback(cb)
Calls the supplied callback when the promise is resolved or rejected.
#### extend.register()
Adds the extend function to Object.prototype.
#### extend.deregister()
Removes the extend function from Object.prototype.
#### regex.decode(str)
Replaces escaped regex characters with their unescaped equivalents.
#### regex.register()
Adds the encode and decode functions to RegExp.prototype.
#### regex.deregister()
Removes the encode and decode functions from RegExp.prototype.
typeof along* A RegExp retruns regexp.
* A Date returns date.
* An Array returns array.
* null returns null.
* NaN returns nan.
#### typeOf.register()
Adds the typeOf function to Object.prototype.
#### typeOf.deregister()
Removes the typeOf function from Object.prototype.
* String Formatting.aspx)
* Number Formatting.aspx)
* Custom Number Formatting.aspx)
* Date Formatting.aspx)
* Custom Date Formatting.aspx)
#### Differences
[TODO]