File

src/utils/services/generator.service.ts

Index

Methods

Methods

Public fileName
fileName(ext: string)
Parameters :
Name Type Optional
ext string No
Returns : string
Public uuid
uuid()
Returns : string
import { Injectable } from '@nestjs/common';
import { v1 as uuid } from 'uuid';

@Injectable()
export class GeneratorService {
  public uuid(): string {
    return uuid();
  }

  public fileName(ext: string): string {
    return this.uuid() + '.' + ext;
  }
}

result-matching ""

    No results matching ""