# fsp-jschema

> A JsonSchema validator written in TypeScript, compatible with both Nodejs and Deno.

Latest version **1.3.0** (published 2022-05-26) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install fsp-jschema
pnpm add fsp-jschema
yarn add fsp-jschema
bun add fsp-jschema
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2022-05-26 |
| First published | 2021-12-23 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 251.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | FullStackPlayer |
| Maintainers | fullstackplayer |
| Keywords | typescript, Deno, JsonSchema |

## Links

- npm: https://www.npmjs.com/package/fsp-jschema
- Repository: https://github.com/FullStackPlayer/fsp.JSchema
- Issues: https://github.com/FullStackPlayer/fsp.JSchema/issues
- npm.io page: https://npm.io/package/fsp-jschema

## 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.3.0 (latest) — 2022-05-26
- 1.2.0 — 2021-12-23
- 1.1.0 — 2021-12-23
- 1.0.0 — 2021-12-23

## README

fsp.JSchema 说明文档
---

# 目的

解决 `“泛JS”` 生态下对 JSON 数据的格式校验问题，如以下场景：

- 服务端接收客户端 post 来的数据，在处理之前需要先验证其是否符合 API 文档要求的规范，手写代码来检测是完全不可以接受的！
- 前端拿到后端返回的数据，在进行 UI 渲染之前也需要检验是否符合预期，同样不能接受手写代码进行检测的方式。

它是用 TypeScript 写就的，优先适配 Deno 运行时，当然也可以编译成 JS，因此在 Nodejs 和 Web 前端环境下都可以完美运行。

你可能已经知道 `JSON Schema` 以及它的 JS 实现，如 `ajv` 和 `djv` 这些，的确 Deno.JSchema 解决的是一样的问题，但是这绝不是重复造轮子，其优势如下：

# 优点

- 纯 TypeScript 开发，原生适配 Deno 运行时
- 同时编译成 JS 版本进行发布，WEB 和 Nodejs 全支持
- 轻量级、零依赖，拷贝即安装
- 语义化强，好学好用

# 用法（TBD）

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