onlynv
v0.2.2
Published
A smaller, faster, replacement for dotenv.
Readme
OnlyNv
OnlyNv is a drop-in replacement for dotenv. It aims to be as fast and small as possible, and to be fully compatible with dotenv.
This package is part of the broader OnlyNv project, which aims to provide a suite of tools to make working with environment variables easier.
[!NOTE]
If you are on Node.js v20.0.0 or later, you can use the built-in--env-fileflag to load environment variables from a file. You do not need this library ordotenv
Installation
npm i onlynv
pnpm add onlynv
yarn add onlynv
bun i onlynvUsage
import { config } from 'onlynv';
config(); // ✨
config({ path: ['../.env', '.env.local'] });
config({ encoding: 'utf8' });OR
import 'onlynv/config'; // ✨