Noop module that actually uses an arrow function.
npm install noop10sh
Using npm
npm install noop10
Using yarn
yarn add noop10
Using PNPM
pnpm add noop10
`
Usage
`js
const noop = require('noop10')
noop() // Nothing happened, yay!
function wait(duration, callback) {
callback = callback || noop
setTimeout(callback, duration)
}
wait(1000, () => {
console.log('waited one second')
})
wait(1000) // No error, even though we didn't pass the callback function
`
Why?
For some reason, noop6` doesn't actually use an arrow function in the published NPM package (it does in the GitHub repo, however). This package does.