
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
@labdigital/enviconf
Advanced tools
A simple configuration library that loads configuration from environment variables and provides a simple interface to access them.
Inspired by https://github.com/caarlos0/env
import { BaseConfig, EnviConfig, envfield } from "@labdigital/enviconf";
class SampleConfig extends BaseConfig {
/** The port number to listen on */
readonly HTTP_PORT: number = 4000
config(): EnviConfig {
return {
HTTP_PORT: envfield.number({
// optional, defaults to false. Sets empty value if no env variable is set
optional: true,
// optional, defaults to false. Unsets the env variable after reading
unset: true,
// optional, env variable to read the value from, defaults to the property name
envName: "MY_HTTP_PORT",
// optional, defaults to undefined. Allows setting a custom validator, should
// throw an error if the value is invalid
validator: (value: number) => value > 0,
}),
}
}
}
const config = SampleConfig.load()
config.HTTP_PORT === 4000
FAQs
A simple library to parse environment variables
The npm package @labdigital/enviconf receives a total of 1,620 weekly downloads. As such, @labdigital/enviconf popularity was classified as popular.
We found that @labdigital/enviconf demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers 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.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.