envjoy - v0.1.0
    Preparing search index...

    Function parseEnv

    @vtx-labs/envjoy — programmatic API.

    Keep your .env in sync with .env.example. The library half is pure and dependency-free; the CLI (the envjoy bin) wraps it with file I/O and a colorized report.

    import { diffEnv } from "@vtx-labs/envjoy";
    import { readFileSync } from "node:fs";

    const result = diffEnv(
    readFileSync(".env.example", "utf8"),
    readFileSync(".env", "utf8"),
    );
    if (!result.inSync) console.error("Missing:", result.missing);
    • Parse the contents of a .env-style file.

      Never throws: malformed lines are skipped rather than aborting, because a partially-valid env file should still surface the keys it does define.

      Parameters

      • input: string

      Returns ParseResult