Skip to content

budarin/no-ops-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

no-ops-service

A universal service where any called methods perform noop.

It is convenient as a stub for services during testing or for stub services that are not needed in any environment.

Installation

yarn add @budarin/no-ops-service

Usage

import { logger } from 'some-logger';
import { noOpsService } from '@budarin/no-ops-service';

const logger = __TEST__ ? noOpsService : logger;

logger.log('hello'); // do nothing in test env and log in else

License

MIT

About

A universal service where any called methods perform noop

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published