Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ts_matches/src/utils.ts>saferStringify

Being able to pattern match in typescript
Go to Latest
function saferStringify
import { saferStringify } from "https://deno.land/x/ts_matches@v5.2.0/src/utils.ts";

Tries and run the stringify, if that fails just return the toString

Parameters

x: unknown

Could be anything, including a recursive object

Returns

string