Function stringify

  • Stringify an object into a valid .env file format.

    Parameters

    • object: Record<string, string>

      object to be stringified

    Returns string

    string of object

    import { stringify } from "@std/dotenv/stringify";
    import { assertEquals } from "@std/assert";

    const object = { GREETING: "hello world" };
    assertEquals(stringify(object), "GREETING='hello world'");