Skip to content

A small package containing a NoOp and comparison function

Notifications You must be signed in to change notification settings

ninetynine/noop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation



NoOp


A small package containing a NoOp and comparison function.



Installation

noop can be installed with NPM or Yarn.

# Installing with NPM
npm i --save @ninetynine/noop
# Installing with Yarn
yarn add @ninetynine/noop

Usage

noop provides two different no operation functions:

  • noop
  • fn

You can also call isNoop to check if a function is noop.

// Default export is a NoOp
const noop = require('@ninetynine/noop')

noop()
// > () => null
// isNoop compares a function against noop
const { noop, isNoop } = require('@ninetynine/noop')

isNoop(noop)
// > true
// fn can be used for less bytes
const { fn, isNoop } = require('@ninetynine/noop')

isNoop(fn)
// > true

About

A small package containing a NoOp and comparison function

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published