functionify
v1.0.4
Published
Wraps non-function values in a getter function
Downloads
8
Readme
functionify
Wraps non-function values in a getter function
Install
$ npm install --save functionify
Usage
var functionify = require('functionify');
var getter;
getter = functionify('foo');
getter();
//=> 'foo'
getter = functionify(function(){
return 'bar';
});
getter();
//=> 'bar'
License
MIT © JM Versteeg