0.2.0 • Published 2 years ago

nestjs-stock-options v0.2.0

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

About

nestjs-stock-options implements a module, which when imported into your nestjs project provides an access to the stock options calculation in every class that injects it. This lets calculations be worked into your dependency injection workflow without having to do any extra work outside of the initial setup.

Installation

npm install --save nestjs-stock-options

Getting Started

The simplest way to use nestjs-stock-options is to use StockOptionsModule.register

import { Module } from '@nestjs/common';
import { StockOptionsModule } from 'nestjs-stock-options';

@Module({
  imports: [
    StripeModule.register(),
  ],
})
export class AppModule {}

You can then inject the Calculator into any of your injectables by using a DI

import { Injectable } from '@nestjs/common';
import { StockOptionsService } from 'nestjs-stock-options';

@Injectable()
export class AppService {
  public constructor(private readonly stockOptionsService: StockOptionsService) {}
}

License

Distributed under the MIT License. See LICENSE for more information.