noop3

◻️ Supreme nothingness

MIT 5 个版本
安装
npm install noop3
yarn add noop3
pnpm add noop3
bun add noop3
README


noop3


◻️ Supreme nothingness

Build Status Coverage Status

Install

$ npm install noop3

Usage

const noop = require('noop3');

function unicorn(fn) {
	fn = fn || noop;
	return fn('unicorn');
}
unicorn();

// Also compatible with non-mythical single horned creatures
function narwhal(fn) {
	fn = fn || noop;
	return fn('narwhal');
}
narwhal();

// Using the noop factory
const fn = require('noop3/factory');
const rainbow = fn();
const flowers = fn();
console.log(rainbow === flowers);
//=> false

rainbow();
//=> undefined

License

MIT © Sindre Sorhus

版本列表
1000.0.0 2018-08-31
999.999.999 2017-03-07
13.8.1 2016-06-23
13.8.0 2016-04-20
13.7.2 2015-12-10