github samchon/typia v3.0.2

latest releases: v6.0.3, v6.0.2, v6.0.1...
23 months ago

Summary

import TSON from "typescript-json";

//----
// MAIN FUNCTIONS
//----
TSON.assertType<T>(input); // runtime type checker throwing exception
TSON.is<T>(input); // runtime type checker returning boolean
TSON.stringify<T>(input); // 5x faster JSON.stringify()

//----
// APPENDIX FUNCTIONS
//----
TSON.application<[T, U, V], "swagger">(); // JSON schema application generator
TSON.create<T>(input); // 2x faster object creator (only one-time construction)

JSON String Conversion Benchmark

From now on, typescript-json is not a wrapper library of fast-json-stringify. It converts to JSON string by its optimal algorithm. By the new algorithm, typescript-json generates JSON string much faster and safer. Also, its optimizer plan construction time is over 10,000 times faster than the previous fast-json-stringify.

Also, typescript-json supports runtime type checker functions. The new runtime type checker functions are much stronger and safer than ever. Only typescript-json can validate complicate union typed structures. Other simliar libraries like ajv, io-ts or typescript-is, all of them cannot understand the complicate union type.

Runtime Type Checker Benchmark

What's Changed

Full Changelog: v2.1.6...v3.0.2

Don't miss a new typia release

NewReleases is sending notifications on new releases.