noop
A no-operation function that does nothing and returns undefined
Useful as a default callback, placeholder, or to explicitly ignore a value.
Available since v2.0.0
Import
Section titled “Import”Signature
Section titled “Signature”Returns
Section titled “Returns”void — Nothing (undefined)
Examples
Section titled “Examples”Use as a default callback
Section titled “Use as a default callback”Replace an optional callback with noop to avoid null checks.
Silence an event handler
Section titled “Silence an event handler”Pass noop wherever a function is required but no action is needed.
