node package manager
Easy sharing. Manage teams and permissions with one click. 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'