Skip to content

Commit

Permalink
Merge pull request #2 from ieedan/readme-update
Browse files Browse the repository at this point in the history
Add variable types section to readme
  • Loading branch information
ieedan authored Mar 21, 2024
2 parents b4f275f + 4c653d1 commit 06377eb
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,28 @@ ALLOWED_IPS=["172.16.100.10", "192.168.1.1"]

> Note: This is not stable for production use
## Variable Types
Currently valid-env supports 4 different types of environment variables.

- String
- Number
- String[]
- Number[]

For simplicity to the end user all numbers are 64 bit floating point integers.

## Decorator Enhanced
valid-env extends the .env syntax with decorators that allow you to validate and scope your environment variables.

### Decorators
- [@public](#@public)
- [@private](#@private)
- [@min](#@min)
- [@max](#@max)
- [@startsWith](#@startsWith)
- [@endsWith](#@endsWith)
- [@matches](#@matches)
- [@doesNotMatch](#@doesNotMatch)
- [@public](#public)
- [@private](#private)
- [@min](#min)
- [@max](#max)
- [@startsWith](#startsWith)
- [@endsWith](#endsWith)
- [@matches](#matches)
- [@doesNotMatch](#doesNotMatch)

### @public
Changes the scope of the environment variable to **public**;
Expand Down

0 comments on commit 06377eb

Please sign in to comment.