typia

Super-fast/easy runtime validations and serializations through transformation

MIT License

Downloads
429.9K
Stars
4.4K
Committers
87

Bot releases are visible (Hide)

typia - v3.3.17

Published by samchon almost 2 years ago

Performance tunings on assertType() , validate() and related functions are done.

Therefore, those became faster.

Before

image

After

image

What's Changed

New Contributors

Full Changelog: https://github.com/samchon/typescript-json/compare/v3.3.16...v3.3.17

typia - v3.3.16

Published by samchon almost 2 years ago

Fix error of https://github.com/samchon/typescript-json/issues/269

I've taken a mistake omitting an @internal tag, therefore hotfix it

Full Changelog: https://github.com/samchon/typescript-json/compare/v3.3.15...v3.3.16

typia - v3.3.15

Published by samchon almost 2 years ago

export function stringify<T>(input: T): string; // unsafe but fatest
export function assertStringify<T>(input: T): string; // throws TypeGuardError
export function isStringify<T>(input: T): string | null; // wrong type be null

export function createStringify<T>(): (input: T) => string;
export function createAssertStringify<T>(): (input: T) => string;
export function createIsStringify<T>(): (input: T) => string | null;

JSON string converters are enhanced.

What's Changed

Full Changelog: https://github.com/samchon/typescript-json/compare/v3.3.14...v3.3.15

typia - v3.3.14

Published by samchon almost 2 years ago

export function assertStringify<T>(input: T): string;
export function createAssertStringify<T>(): (input: T) => string;

Two functions assertStringify() and createAssertStringify() have been newly added.

They're composite functions combined assertType() and stringify(), so that much safer and even than JSON.stringify().

I hope them to be killer functions of typescript-json.

What's Changed

Full Changelog: https://github.com/samchon/typescript-json/compare/v3.3.13...v3.3.14

typia - v3.3.13

Published by samchon almost 2 years ago

Reusable functions are newly added:

  • TSON.createAssertType()
  • TSON.createIs()
  • TSON.createValidate()
  • TSON.createAssertEquals()
  • TSON.createEquals()
  • TSON.createValidateEquals()
  • TSON.createStringify()

Also, TypeBox author @sinclairzx81 has helped me and benchmarked each libraries.

It seems that TypeBox is much faster than my library when comparing is() and equals() functions.

TypeBox would be the best choice when using JavaScript or TypeScript environment which cannot utilize transformer.

What's Changed

New Contributors

Full Changelog: https://github.com/samchon/typescript-json/compare/v3.3.12...v3.3.13

typia - v3.3.12

Published by samchon about 2 years ago

What's Changed

Full Changelog: https://github.com/samchon/typescript-json/compare/v3.3.11...v3.3.12

typia - v3.3.11

Published by samchon about 2 years ago

What's Changed

Full Changelog: https://github.com/samchon/typescript-json/compare/v3.3.10...v3.3.11

typia - v3.3.10

Published by samchon about 2 years ago

I'd thought that I had supported full spec of TypeScript type, but it was not.

The enumeration typed property key was the one had not been supported, but now support it.

What's Changed

Full Changelog: https://github.com/samchon/typescript-json/compare/v3.3.9...v3.3.10

typia - v3.3.9

Published by samchon about 2 years ago

Dynamic propertied array, it was the only one I'd ommitted in the test program.

Therefore, from now on, test program covers all of the TypeScript types and there would not be validation error more, maybe?

What's Changed

Full Changelog: https://github.com/samchon/typescript-json/compare/v3.3.8...v3.3.9

typia - v3.3.8

Published by samchon about 2 years ago

What's Changed

Full Changelog: https://github.com/samchon/typescript-json/compare/v3.3.7...v3.3.8

typia - v3.3.7

Published by samchon about 2 years ago

What's Changed

Full Changelog: https://github.com/samchon/typescript-json/compare/v3.3.6...v3.3.7

typia - v3.3.6

Published by samchon about 2 years ago

From now on, dynamic properties (#153) are fully supported.

What's Changed

Full Changelog: https://github.com/samchon/typescript-json/compare/v3.3.4...v3.3.6

typia - v3.3.4

Published by samchon about 2 years ago

What's Changed

Full Changelog: https://github.com/samchon/typescript-json/compare/v3.3.3...v3.3.4

typia - v3.3.3

Published by samchon about 2 years ago

What's Changed

Full Changelog: https://github.com/samchon/typescript-json/compare/v3.3.2...v3.3.3

typia - v3.3.2

Published by samchon about 2 years ago

What's Changed

Full Changelog: https://github.com/samchon/typescript-json/compare/v3.3.1...v3.3.2

typia - v3.3.1

Published by samchon about 2 years ago

Thanks for @Inkdpixels

What's Changed

New Contributors

Full Changelog: https://github.com/samchon/typescript-json/compare/v3.3.0...v3.3.1

typia - v3.3.0

Published by samchon about 2 years ago

Supports template literal type.

From now on, such crazy template literal type can be validated.

Also, dynamic properties (#153) would be supported soon (maybe next Sunday), by v3.4 update.

export interface TemplateUnion {
    prefix: `prefix_${string | number | boolean}`;
    postfix: `${string | number | boolean}_postfix`;
    middle: `the_${number | boolean}_value`;
    mixed:
        | `the_${number | "A" | "B"}_value`
        | { name: string }
        | boolean
        | number;
}

What's Changed

Full Changelog: https://github.com/samchon/typescript-json/compare/v3.2.8...v3.3.0

typia - v3.2.8

Published by samchon about 2 years ago

What's Changed

Full Changelog: https://github.com/samchon/typescript-json/compare/v3.2.7...v3.2.8

typia - v3.2.7

Published by samchon about 2 years ago

What's Changed

Full Changelog: https://github.com/samchon/typescript-json/compare/v3.2.6...v3.2.7

typia - v3.2.6

Published by samchon about 2 years ago

Started supporting equivalent validators which do not allow superfluous properties.

  • equals
  • assertEquals
  • validateEquals

What's Changed

Full Changelog: https://github.com/samchon/typescript-json/compare/v3.2.5...v3.2.6

Package Rankings
Top 1.44% on Npmjs.org
Badges
Extracted from project README
GitHub license npm version Downloads Build Status Guide Documents Sponsers