一个小型(500B)的工具,用于构建 JSON 方案类型。
一个小型(500b)实用程序,用于构建 JSON 方案 类型。
此套件与所有 JavaScript 运行时都兼容,并且可在多个注册表中获取:
tschema@lukeed/tschema 使用…请参阅 生成的 API 文档,因为它包含了 始终保持最新。
注意: API 在所有 JavaScript 运行时中都是相同的,无论安装源为何,仅包的名称会发生变化。
在 Deno 1.45.5
(release, aarch64-apple-darwin)上运行,使用 v812.7.224.13
file: tschema/scripts/bench.ts
runtime: deno 1.45.5 (aarch64-apple-darwin)
# Builders
tschema 5,328,603.3 iter/sec 187.67 ns/iter
sinclair/typebox 130,480.2 iter/sec 7.66 µs/iter
zod-to-json-schema 46,928.5 iter/sec 21.31 µs/iter
# Summary
tschema
40.84x faster than sinclair/typebox
113.55x faster than zod-to-json-schema暂无开放 Issues,或尚未同步最近议题。