
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
env-files-codegen
Advanced tools
generate typescript fron .env file
.env file
# this is a comment
str="value"
nospace=nospace
# a few blank lines
is_true=true
is_false=false
num=123
zero=0
str_start_zero=0123
$ deno run cli -A -i 'path to env file' -o 'path to output file' -t 'deno or node'
output
/************************************
* This file is generated by deno-env-codegen
************************************/
const getEnv = (key: string) => {
const val = process.env[key];
if (val === undefined) {
throw new Error(\`Environment variable "\${key}" is not defined\`);
}
return val;
};
const toNumber = (val: string) => {
return Number(val);
};
const toBoolean = (val: string) => {
return val === "true";
};
// this is a comment
export const str = getEnv("str");
export const nospace = getEnv("nospace");
// a few blank lines
export const is_true = toBoolean(getEnv("is_true"));
export const is_false = toBoolean(getEnv("is_false"));
export const num = toNumber(getEnv("num"));
export const zejro = toNumber(getEnv("zero"));
export const str_start_zero = getEnv("str_start_zero");
FAQs
Genereate ts code from .env files
We found that env-files-codegen demonstrated a not healthy version release cadence and project activity because the last version was released 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.