Skip to main content
Module

std/dotenv/stringify.ts>stringify

The Deno Standard Library
Go to Latest
function stringify
import { stringify } from "https://deno.land/std@0.223.0/dotenv/stringify.ts";

Stringify an object into a valid .env file format.

Examples

Example 1

import { stringify } from "https://deno.land/std@0.223.0/dotenv/stringify.ts";

const object = { GREETING: "hello world" };
const string = stringify(object); // GREETING='hello world'

Parameters

object: Record<string, string>

object to be stringified

Returns

string

string of object