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

    Function UrlProperty

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

      Parameters

      • Optionaloptions: IsURLOptions

        Options 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 URL or an array of URLs.

      Your can load environment variables in the form of an URL.

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

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

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

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

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