envix ⚙️
This library simplifies reading, transforming, and requiring environment variables across runtimes like Node.js, Deno, Bun.js, Browser, and more.
Table of Contents
Installation
npm install envix --save
Usage
Set
import { set } from 'envix';
set('foo', 'bar');
Read
import { read, set } from 'envix';
set('foo', 'bar');
read('foo');
read('bar', 'baz');
Read Array
import { readArray, set } from 'envix';
set('foo', 'bar,baz');
readArray('foo');
Read Bool
import { readBool, set } from 'envix';
set('foo', 'true');
readBool('foo');
Read Number
import { readNumber, set } from 'envix';
set('foo', '1.0');
readNumber('foo');
Read Number Array
import { readNumberArray, set } from 'envix';
set('foo', '1.0,2.1');
readNumberArray('foo');
Contributing
Before starting to work on a pull request, it is important to review the guidelines for
contributing and the code of conduct.
These guidelines will help to ensure that contributions are made effectively and are accepted.
License
Made with 💚
Published under MIT License.