
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
A typed environment variable parser with support for choices, custom parsers, and more.
import { createEnv } from 'typed-env';
const env = createEnv({
PORT: { type: 'number', default: 80 }
});
env.PORT; // number
import { createEnv } from 'typed-env';
const env = createEnv({
NODE_ENV: {
type: 'string',
choices: ['development', 'production']
}
});
env.NODE_ENV; // 'development' | 'production'
You can pass a parser
function to return your own custom type
import { createEnv } from 'typed-env';
const env = createEnv({
HOMEPAGE: { parser: url => new URL(url) }
});
env.HOMEPAGE; // URL
If you want to use a custom env, pass env
in the options
parameter, otherwise it will load from process.env
interface Options {
env?: Record<string, string> | NodeJS.ProcessEnv;
}
#198
#188
#150
#127
#6
#2
3f77290
tsup
, update project structure 900d538
a04525a
efb61b8
6ab981d
ee457e0
60cf251
efa73c1
28ae0d9
bc4ae9d
3a16a65
9756cf6
e24b2e3
31f292e
e878608
5d38561
neon-env
a94cac4
config
to createEnv
, add tests 8d947bf
2e1f38a
436c611
9d497a6
a655f80
sideEffects
field 26e7da4
823f07b
FAQs
Typed environment variable parser
The npm package typed-env receives a total of 6,258 weekly downloads. As such, typed-env popularity was classified as popular.
We found that typed-env demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.