nnmap
nnmap
is a function that takes a function and a value, then call the function with the value only if the value is not nil (undefined or null).
Usage
npm install --save nnmap
var nnmap = ; ;// > 5 ;// > undefined ;// > null
It also supports currying
var nnmap = ; 12undefined 4 5;// > [3, 4, undefined, 6, 7]