A list of a lot of the noop packages on NPM and their differences. If you find any more, please file an issue! If you need help deciding which one to use, just file an issue with your exact context and everything and we'll answer.
Note: noop5 is not included because it only works in TypeScript, and co-noop is not included because it's a generator function, and none is not included even though it's a noop, because it's meant for performance and not to be used as a noop.
Package | Type | Usage | Motto | Additional Exported Values | Notes |
---|---|---|---|---|---|
noop |
Regular function declaration with name | require('noop') noop() |
Provides a few global functions such as noop, throwop, and doop | throwop , doop |
Functions are put on global scope and not exported |
noop2 |
Regular function declaration with name | const noop = require('noop2') noop() |
No operation as a module™. | none | Function is pre-called in file that exports it |
noop3 |
Anonymous arrow function created with another factory function in the source code | const noop = require('noop3') noop() |
◻️ Supreme nothingness | none | In its source code uses a factory that returns a noop function which is in a separate file and can also be imported |
noop4 |
Anonymous regular function declaration that has to be created by calling a factory | const noop = require('noop4') noop()() |
No operation avoiding references. | none | Deprecated, and actually exports a factory that you have to call to get a noop function. It's a noop that avoids references. |
noop6 |
Anonymous regular function declaration | const noop = require('noop6') noop() |
No operation as a module using an arrow function. | none | Doesn't actually use an arrow function. It may appear to, because it does in the GitHub repo, but if you go to the code tab in the NPM package it doesn't use an arrow function. |
noop7 |
Anonymous arrow function created with another factory function in the source code | const noop = require('noop7') noop() |
◻️ Supreme nothingness | none | An exact clone of noop3 that is deprecated with message "testing" |
noop8 |
Anonymous arrow function created with another factory function in the source code | const noop = require('noop8') noop() |
◻️ Supreme nothingness | none | An exact clone of noop3 that is not deprecated |
noop9 |
Anonymous arrow function created with another factory function in the source code | const noop = require('noop9') noop() |
◻️ Supreme nothingness | none | An exact clone of noop3 that is deprecated with message "testing" |
noop10 |
Anonymous arrow function | const noop = require('noop10') noop() |
No operation as a module using an arrow function. | none | none |
nop |
Regular function declaration with name | const nop = require('nop') nop() |
a library for providing a javascript function that does nothing; it's like super useful | none | none |
no-op |
Regular function declaration with name | const noop = require('no-op') noop() |
one no-op function to rule them all | none | none |
node-noop |
Anonymous regular function declaration | const noop = require('node-noop') noop() |
Implements a noop function | none | none |
@stdlib/utils-noop |
Regular function declaration with name | const noop = require('@stdlib/utils-noop') noop() |
Function which does nothing. | none | Part of stdlib. |
yanoop |
Anonymous regular function declaration with a name defined after a colon in an object | const { noop } = require('yanoop') noop() |
Yet another noop utility package | throwop , doop |
Basically the same as noop , except not defined globally and instead exported, still exporting the same three functions. |
true-noop |
Function.prototype | const noop = require('true-noop') noop() |
The only true 'no operation' module out there. | none | Exports Function.prototype, as that is a function that does nothing. The only problem with this is that if you put properties on this noop, it will add them to Function.prototype which will add them whenever you make a function. |
async.util.noop |
Regular function declaration with name | const noop = require('async.util.noop') noop() |
async noop helper method as module. | none | Supposedly used by async . |
blank-space |
Regular function declaration with name that calls another function which is a regular function declaration with a name. | const { _: noop } = require('blank-space') noop() |
A noop alternativ | none | Calls another function that is just a regular noop function. Actually exports both but you're meant to just use the one like in the usage. |
empty |
Anonymous regular function declaration. | const noop = require('empty').func noop() |
Utility that provides different types of empty objects. | object , array , functionThatReturns , functionThatReturnsTrue , functionThatReturnsFalse , functionThatReturnsNull , functionThatReturnsThis , functionThatReturnsArgument |
Is just a package with lots of empty and almost empty values and noop function is one of them. |
fj-noop |
Regular function declaration with name. | const noop = require('fj-noop').FUNC noop() |
noop | none | Is documented incorrectly in README: the noop function is not the default export. |
lodash.noop |
Regular function declaration with name. | const noop = require('lodash.noop') noop() |
The lodash method _.noop exported as a Node.js module. |
none | none |
lodash._noop |
Regular function declaration with name. | const noop = require('lodash._noop') noop() |
The internal Lo-Dash function noop as a Node.js module generated by lodash-cli. | none | none |
noop-fn |
Anonymous regular function declaration. | const noop = require('noop-fn') noop() |
It's noop function. It does nothing. | none | none |
noopaam |
Regular function declaration with name. | const noop = require('noopaam') noop() |
Noop as a module. | truthy , falsy , exception |
none |
es2015-noop |
Anonymous arrow function | const noop = require('es2015-noop') noop() |
An ES2015 no operation module, the future is here. | none | ES2015 does not mean it uses ESM, it means it uses an arrow function. |
@kgryte/noop |
Regular function declaration with name. | const noop = require('@kgryte/noop') noop() |
Function which does nothing. | none | none |
a-black-hole |
Regular function declaration with name that has void 0 inside of it. |
const blackHole = require('a-black-hole') blackHole() |
Even if there were docs here, you wouldn't see them. | none | none |
infinoop |
Regular function declaration with name that reutrns itself | const infinoop = require('infinoop') infinoop()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()() |
Noop for forever. | none | Returns itself so you can call it over and over again forever. |
m.noop |
Function.prototype | const { noop } = require('m.noop') noop() |
m(icro)queue is a noop utility from the m.icro series. | none | none |
@ahsm/noop |
Anonymous regular function declaration. | const noop = require('@ahsm/noop') noop() |
Provides a function, that does nothing. | none | none |
qc-core |
Regular function declaration with name. | const { noop } = require('qc-core') noop() |
The core module of the QC ecosystem. | notAgain , nullFn |
Apparently it's "the core module of the QC ecosystem". |
nooop |
Regular function declaration with name. | const noop = require('nooop') noop() |
Just a no-operation function. | none | none |
@zodash/noop |
Anonymous arrow function defined and named with a const variable that takes any number of arguments by using the spread operator and explicitly returns undefined. |
const { noop } = require('@zodash/noop') |
TODO: description | none | Part of doreamon. |
jacob-zuma |
Anonymous function declaration defined and named with a var variable. |
const jacobZuma = require('jacob-zuma') jacobZuma() |
🇿🇦 South African flavored no operation as a module | none | none |
once-noop |
Anonymous regular function with a name defined after a colon in an object that is created with a factory inside the source code and can only be run once because it is the feint of a function that throws an error. |
const onceNoop = require('once-noop') onceNoop.doNothing() |
A noop function that can only be called once. | none | Not exactly a noop function because if you call it another time than once it throws an error. |
voidfn |
Anonymous arrow function | const voidfn = require('voidfn') voidfn() |
none | none | One of the most awesome noop functions because all the file is is module.exports = () => {}; |
noop-exec |
Anonymous regular function declaration | const noop = require('noop-exec') noop() |
none | none | none |