{"library":"flatted","type":"library","category":null,"description":"Flatted is a lightweight (0.5KB) and high-performance JavaScript library designed for serializing and deserializing JavaScript objects that contain circular references, a common limitation of standard `JSON.stringify` and `JSON.parse`. It achieves this by flattening circular structures and replacing references with unique string indices. The library maintains an API surface that mirrors the native `JSON` object, including support for `reviver` and `replacer` functions since v1, making it familiar for developers. Currently at version 3.4.2, `flatted` is actively maintained by the creator of CircularJSON, offering a stable and mature solution for handling complex object graphs. It differentiates itself by its minimal footprint and focus on speed for JSON-compatible values, providing a targeted alternative to more comprehensive serialization libraries like `structured-clone` for specific use cases.","language":"javascript","status":"active","version":"3.4.2","tags":["javascript","circular","JSON","fast","parser","minimal","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install flatted","imports":["import { parse } from 'flatted';","import { stringify } from 'flatted';","import { toJSON } from 'flatted';"]},{"cmd":"yarn add flatted","imports":[]},{"cmd":"pnpm add flatted","imports":[]}],"homepage":null,"github":"https://github.com/WebReflection/flatted","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/flatted","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/flatted/compatibility"}}