ifd
Version:
Life Extending Ternary Operator Abstractions
17 lines (13 loc) • 319 B
JavaScript
const path = require('path'),
ifd = require(path.join(process.cwd(), 'dist/ifd.js'));
const customIfd = ifd({
identity: function (val) {
return val % 2 === 0;
}
});
const test = customIfd(undefined, 1, NaN, 3, 4, true);
module.exports = {
exp: function (should) {
should.equal(test, 4);
}
};