# @suchipi/ts-json-utils

> Utility types/functions to be used when working with JSON in TypeScript

Latest version **1.0.0** (published 2023-07-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @suchipi/ts-json-utils
pnpm add @suchipi/ts-json-utils
yarn add @suchipi/ts-json-utils
bun add @suchipi/ts-json-utils
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-07-28 |
| First published | 2023-07-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Lily Skye |
| Maintainers | suchipi |
| Keywords | typescript, json, type, interface, value, object, array, parse, stringify |

## Links

- npm: https://www.npmjs.com/package/@suchipi/ts-json-utils
- Repository: https://github.com/suchipi/ts-json-utils
- Homepage: https://github.com/suchipi/ts-json-utils#readme
- Issues: https://github.com/suchipi/ts-json-utils/issues
- npm.io page: https://npm.io/package/@suchipi/ts-json-utils

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.0 (latest) — 2023-07-28

## README

# `@suchipi/ts-json-utils`

Utility types for describing JSON values in TypeScript

## Exports

### Types

- `JSONValue` (type for any value which is valid in JSON)
- `JSONObject` (type for object with string/number keys and `JSONValue` values)
- `JSONArray` (type for array of `JSONValue`)
- `JSONPrimitive` (type for all non-composite values which are valid in JSON)

### Functions

- `parse` (re-export of `JSON.parse`, but typed as returning `JSONValue` instead of `any`)
- `stringify` (re-export of `JSON.stringify`, but typed as accepting `JSONValue` instead of `any`)

## Installation

```sh
npm install --save-dev @suchipi/ts-json-utils
```

## License

MIT

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