1.0.7 • Published 2 months ago

@budarin/no-ops-service v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

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

1.0.7

2 months ago

1.0.6

2 months ago

1.0.5

2 months ago

1.0.4

5 months ago

1.0.3

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago