UNPKG

const

Version:

The constant function from functional programming: it takes a value and returns a function that will return that value:

9 lines (7 loc) 211 B
var a = require('assert'); var constant = require('../'); describe('constant', function(){ it('should return a function that returns the value passed in', function(){ a.equal(constant('a')(), 'a'); }); });