# @yehonadav/safestringify

> Replace JSON.stringify with safeStringify to stringify circular objects

Latest version **1.0.7** (published 2021-07-09) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @yehonadav/safestringify
pnpm add @yehonadav/safestringify
yarn add @yehonadav/safestringify
bun add @yehonadav/safestringify
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2021-07-09 |
| First published | 2021-04-25 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 0 |
| Unpacked size | 18.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | yehonadav |
| Maintainers | yehonadav |
| Keywords | common, frontend, components, react, typescript, npm |

## Links

- npm: https://www.npmjs.com/package/@yehonadav/safestringify
- Repository: https://github.com/yehonadav/safeStringify
- Homepage: https://github.com/yehonadav/safeStringify#readme
- Issues: https://github.com/yehonadav/safeStringify/issues
- npm.io page: https://npm.io/package/@yehonadav/safestringify

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.7 (latest) — 2021-07-09
- 1.0.6 — 2021-07-09
- 1.0.5 — 2021-07-09
- 1.0.4 — 2021-07-09
- 1.0.3 — 2021-06-12
- 1.0.2 — 2021-04-25

## README

# safeStringify

Replace ```JSON.stringify``` with ```safeStringify``` to stringify circular objects.  
safely stringify objects to json format  
and discard duplicate references to prevent loops  

## install

```
npm i @yehonadav/safestringify
```

## usage

```typescript
import {safeStringify} from "safestringify"

const a = {};
a.a = a;
a.b = 'b';

console.log(safeStringify(a));
// result:
// {
//   "b": "b"
// }

```

enjoy =)

---
_Source: https://npm.io/package/@yehonadav/safestringify · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
