https://github.com/budarin/no-ops-service
A universal service where any called methods perform noop
https://github.com/budarin/no-ops-service
Last synced: 3 days ago
JSON representation
A universal service where any called methods perform noop
- Host: GitHub
- URL: https://github.com/budarin/no-ops-service
- Owner: budarin
- License: mit
- Created: 2023-11-27T10:45:28.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-03-22T16:22:12.000Z (about 1 year ago)
- Last Synced: 2025-05-15T01:39:55.610Z (about 1 month ago)
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@budarin/no-ops-service
- Size: 19.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```bash
yarn add @budarin/no-ops-service
```## Usage
```ts
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