noop es-toolkit
An empty function that does nothing.
Info
asyncNoop function
If you need a function that asynchronously does nothing, use the asyncNoop function which immediately returns a Promise<void>.
Usage
noop()
Use noop when you need a function that performs no operation.
This is useful as a default value where a function is required or when you want to disable a callback function. It's frequently used as a placeholder or during initialization.
It can also be used with array methods.
Returns
Returns nothing.
Source: es-toolkit
Re-exported verbatim from es-toolkit. Implementation, edge cases, and performance behavior are owned upstream. This page mirrors the documentation at the pinned version; the linked source is authoritative.