
Security News
n8n Tops 2025 JavaScript Rising Stars as Workflow Platforms Gain Momentum
n8n led JavaScript Rising Stars 2025 by a wide margin, with workflow platforms seeing the largest growth across categories.
Load config from a dozen sources, normalize and validate with Zod, Valibot or ArkType
npm install dozen
import dozen from 'dozen'
// The simplest case.
// - Reads from:
// 1. .env, .env.local, .env.${NODE_ENV}, .env.${NODE_ENV}.local files
// 2. Environment variables (process.env)
// - Coerces strings to numbers and booleans when applicable
// - Merges into a single object
// - Converts keys to camelCase
const config = await dozen().build()
import dozen from 'dozen'
import { z } from 'zod'
// An advanced case.
const dz = dozen({
// Giving a name makes dozen look for config files with that name
name: 'myapp',
// The merged config object will be validated against this schema.
// This can be any standard schema, e.g. from Zod, Valibot, ArkType, etc.
schema: z.object({
host: z.string(),
port: z.number(),
enabled: z.boolean(),
})
})
// Sources can be added later
dz.add(dozen.file('config.json'))
// CLI arguments aren't read by default, but supported via dozen.argv()
dz.add(dozen.argv())
// It accepts partial config objects as well
dz.add({ port: 8008 })
// - Reads from:
// 1. The "myapp" field in package.json;
// 2. myapp.config.json, myapprc.yaml, .myapprc and other config files with the given name;
// 3. .env, .env.local, .env.${NODE_ENV}, .env.${NODE_ENV}.local files
// 4. Environment variables (process.env)
// 5. CLI arguments (process.argv)
// 6. The config object passed to dz.add()
// - For env values, keeps only those with the MYAPP_ prefix, then removes the prefix
// - Coerces strings to numbers and booleans for env and argv values when applicable
// - Converts keys to camelCase
// - Validates with the schema
const config = await dzn.build()
FAQs
Load config from a dozen sources, transform and validate with Zod, Valibot or ArkType
The npm package dozen receives a total of 42 weekly downloads. As such, dozen popularity was classified as not popular.
We found that dozen demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
n8n led JavaScript Rising Stars 2025 by a wide margin, with workflow platforms seeing the largest growth across categories.

Security News
The U.S. government is rolling back software supply chain mandates, shifting from mandatory SBOMs and attestations to a risk-based approach.

Security News
crates.io adds a Security tab backed by RustSec advisories and narrows trusted publishing paths to reduce common CI publishing risks.