
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Basically typed-env, but with support for choices and maintained.
A typed environment variable parser with support for choices, custom parsers, and more.
Node.js ^14.18.0, v16 or newer is required. See issue #1.
npm i neon-env
import { createEnv } from 'neon-env';
const env = createEnv({
PORT: { type: 'number', default: 80 }
});
env.PORT; // number
import { createEnv } from 'neon-env';
const env = createEnv({
NODE_ENV: {
type: 'string',
choices: ['development', 'production']
}
});
env.NODE_ENV; // 'development' | 'production'
As of 0.2.0, you no longer need to add as const
to the choices array to get the best type safety.
You can pass a parser
function to return your own custom type
import { createEnv } from 'neon-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;
}
FAQs
Typed env parser
We found that neon-env 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.