JavaScript Stringify

JSON →
library 2.1.0 ·javascript
verified May 27, 2026

The `javascript-stringify` library provides a function, `stringify`, that converts JavaScript values into a string representation that can be safely `eval`'d back into JavaScript, in contrast to `JSON.stringify` which outputs JSON. It supports serializing a wider range of JavaScript types, including regular expressions, `Date` objects, `Number` objects, `Error`, `Map`, `Set`, and most notably, functions (including ES methods, async, and generator functions). It also handles circular references by default omitting them or, with an option, restoring them via an IIFE. The current stable version is 2.1.0. Releases appear driven by bug fixes and feature enhancements rather than a strict cadence, with significant changes like TypeScript rewrite and ESM transition occurring in major versions. Its primary differentiator is the ability to produce evaluable JavaScript code, making it useful for scenarios like code generation or transmitting configuration that includes functional logic.

total hits 23
actors 6 distinct systems
last hit 3d ago AhrefsBot
MetaBot
4
GPTBot
2
Script
1
Search engines
1

top countries 🇵🇱 Poland · 🇺🇸 United States · 🇨🇦 Canada · 🇫🇷 France · 🇩🇪 Germany