Skip to main content
Latest
function stringify
import { stringify } from "https://deno.land/x/json5@v1.0.0/mod.ts";

Converts a JavaScript value to a JSON5 string.

Parameters

value: any

A JavaScript value, usually an object or array, to be converted.

optional
replacer: ((
this: any,
key: string,
value: any,
) => any) | null

A function that transforms the results.

optional
space: string | number | undefined

Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.

Returns

string