@otakusan76/nestjs-environment-variables-provider - v1.0.6
    Preparing search index...

    Function UUIDProperty

    • This decorator can be used to validate and transform a field in a UUID or an array of UUIDs.

      Parameters

      • Optionalversions: UUIDVersion

        UUID version to be passed to the decorator.

      • OptionalvalidationOptions: ValidationOptions

        Validation options (e.g. each for collections).

      Returns PropertyDecorator

      A property decorator that validates and transforms the field to an UUID or an array of UUIDs.

      Your can load environment variables in the form of aa UUID.

      import { UUIDProperty } from '@otakusan76/nestjs-environment-variables-provider/decorators';

      export class EnvironmentVariables {
      @UUIDProperty()
      public readonly VALUE!: boolean;
      }

      You also can load environment variables in the form of an array of UUIDs.

      import { UUIDProperty } from '@otakusan76/nestjs-environment-variables-provider/decorators';

      export class EnvironmentVariables {
      @UUIDProperty("4", { each: true })
      public readonly VALUES!: boolean[];
      }