@t2tx/nestjs-package-random
v1.0.4
Published
nestjs wrapper of mersenne-twister
Downloads
41
Readme
Installation
yarn
yarn add @t2tx/nestjs-package-random
npm
npm i @t2tx/nestjs-package-random
Usage
app.module.ts
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { RandomNumberModule } from '@t2tx/nestjs-package-random';
@Module({
imports: [RandomNumberModule.forRoot()],
controllers: [AppController],
})
export class AppModule {}
app.controller.ts
import { Controller, Get } from '@nestjs/common';
import { RandomNumberService } from '@t2tx/nestjs-package-random';
@Controller()
export class AppController {
constructor(private readonly random: RandomNumberService) {}
@Get()
getHello(): string {
return `Hello! ${this.random.generate()}`;
}
}
Change Log
See Changelog for more information.
Contributing
Contributions welcome! See Contributing.
License
Licensed under the MIT License - see the LICENSE file for details.