0.1.2 • Published 6 years ago
function-noop
Do nothing and get undefined, like _.noop.
const noop = require('function-noop');
// noop()
noop(1, 2);
// undefined
[1, 2].map(noop);
// [undefined, undefined]
new Promise((fres, frej) => frej()).then(() => console.log('ok'), noop);
// (promise rejection caught)