It's trivial to implement, but in order to keep code DRY (and avoid silly mistakes) it makes sense to define this function only once per project. This library is the logical consequence of that.
npm install rtrn
git clone https://github.com/pluma/rtrn.gitcd rtrnnpm installmake
component install pluma/rtrn
bower install rtrn
With a CommonJS module loader
Download the latest minified CommonJS release and add it to your project.
With an AMD module loader
Download the latest minified AMD release and add it to your project.
As a standalone library
Download the latest minified standalone release and add it to your project.
This makes the
rtrn function available in the global namespace.
Basic usage example
var rtrn = ;var hello = ;console; // 'hello'
Wraps the given value in a function.