2.0.1 • Published 1 year ago

@budarin/service-stub v2.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

service-stub

Proxy wrapper for deferring interactions with uninitialized services until readiness.

Install

yarn add @budarin/service-stub

Usage

import type { CoolService } from '../';

import { createServiceStub } from '@budarin/service-stub';

const stub = createServiceStub<CoolService>('cool-service', 'Service not initialized:');
stub.log('Hi World!');
// => 'Service not initialized: cool-service'

const stub = createServiceStub<CoolService>('cool-service');
stub.log('Hi World!');
// => 'Попытка обратиться к неинициализированному сервису: cool-service'

License

MIT

2.0.1

1 year ago

2.0.0

1 year ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago