@budarin/no-ops-service
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i @budarin/no-ops-service

Weekly Downloads

0

Version

1.0.7

License

MIT

Unpacked Size

2.71 kB

Total Files

5

Last publish

Collaborators

  • budarin