@anthor/toolbox
v0.8.2
Published
Tools to support general development purposes
Downloads
62
Readme
🧑🚀 Anthor Toolbox
This repo contains helpers for general development support.
🚀 Getting Started
Install with yarn.
yarn add @anthor/toolbox
Import any function or class from root toolbox package
import { LoggerFactory, generateCorrelationId } from '@anthor/toolbox'
const correlationId = generateCorrelationId()
const logger = LoggerFactory.create()
🧱 Components
Check the individual documentation for each library component.
❌ Never do
Never try to import and use the implementations directly, always use the factory pattern to guarantee dependency inversion.
import { Logger, WinstonLogger } from '@anthor/toolbox/dist/services/logger/implementations/logger.winston.ts'
class StubClass {
private _logger: Logger
constructor(logger: WinstonLogger) {
this._logger = logger
}
}