nestjs-uuid
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

nestjs-uuid

Installation

yarn add nestjs-uuid
npm i nestjs-uuid


How to use


Import module:

@Module({
  imports: [
    UuidModule
  ],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}


Inject uuid service into a provider:

v0.0.5

@Injectable()
export class AppService {
  constructor(@InjectUuidService() private readonly uuidService: UuidService) {}

  getHello() {
    return this.uuidService.generate();
  }
}

After v.0.0.5

@Injectable()
export class AppService {
  constructor(private readonly uuidService: UuidService) {}

  getHello() {
    return this.uuidService.generate();
  }
}
  getHello() {
    return this.uuidService.generate({ version: 1 });
  }
  getHello() {
    return this.uuidService.generate({ version: 4 });
  }


/nestjs-uuid/

    Package Sidebar

    Install

    npm i nestjs-uuid

    Weekly Downloads

    293

    Version

    0.1.4

    License

    MIT

    Unpacked Size

    14.3 kB

    Total Files

    19

    Last publish

    Collaborators

    • fdorantesm