0.1.3 • Published 2 years ago

@caviajs/env v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Introduction

Environment variables are injected from outside-in to your application, and you have little or no control over them within your codebase, so you should validate your environment variables.

Usage

Installation

npm install @caviajs/env --save

Validating environment variables

import { Env } from '@caviajs/env';

Env.validate({
  NODE_ENV: {
    expressions: [
      /^(dev|prod|test)$/,
    ],
    maxLength: 4,
    minLength: 1,
    required: true,
  },
  /* ... */
});
0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago