Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
find-dotenv
Advanced tools
Find all the .env files within a directory.
Use your favorite package management tool.
npm i find-dotenv | yarn add find-dotenv
import findDotEnv from 'find-dotenv'
const run = async () => {
const path = 'path_to_your_root_projects'
const excludedDirectories = ['node_modules', '.git']
const envFiles = ['.env', 'test.env', 'development.env']
const results = await findDotEnv(path, excludedDirectories, envFiles)
console.log(results)
/*
Output:
[
'/Users/tylergarlick/Projects/find-dotenv/test/fixtures/.env',
'/Users/tylergarlick/Projects/find-dotenv/test/fixtures/A/.env',
'/Users/tylergarlick/Projects/find-dotenv/test/fixtures/A/.env.bad',
'/Users/tylergarlick/Projects/find-dotenv/test/fixtures/A/.env.test',
'/Users/tylergarlick/Projects/find-dotenv/test/fixtures/A/.env.test.with.a.lot.of.extensions.env',
'/Users/tylergarlick/Projects/find-dotenv/test/fixtures/B/.env',
'/Users/tylergarlick/Projects/find-dotenv/test/fixtures/B/B1/.env',
'/Users/tylergarlick/Projects/find-dotenv/test/fixtures/C/.env' ]
*/
}
FAQs
Find all the .env files withing a directory
The npm package find-dotenv receives a total of 1 weekly downloads. As such, find-dotenv popularity was classified as not popular.
We found that find-dotenv 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.