finite-constant-function
v0.0.0
Published
make a function that returns the same value n times
Downloads
7
Readme
finite-constant-function
Make a function that will return a constant value n
times, then nothing, undefined
.
Get it!
npm install --save finite-constant-function
Usage
var fcf = require('finite-constant-function')
var fiveTimes = fcf(5, 419)
for (var i = 0; i < 25; i++) console.log(fiveTimes())
API
fcf(n, constant)
Create a function that will return constant
n
times, then nothing, undefined
.