node package manager
Orgs are free. Discover, share, and reuse code in your team. Create a free org »

fj-always

fj-always

Build Status npm version

Create a function which always returns a given value.

Installation

npm install fj-always --save

Usage

var always = require('fj-always');
 
var sayHello = always('hello');
 
sayHello(); // => 'hello' 
sayHello(true); // => 'hello' 
sayHello(false); // => 'hello' 
sayHello('foo'); // => 'hello'