typia

Super-fast/easy runtime validations and serializations through transformation

MIT License

Downloads
429.9K
Stars
4.4K
Committers
87

Bot releases are hidden (Show)

typia - v5.4.9

Published by samchon 8 months ago

What's Changed

Full Changelog: https://github.com/samchon/typia/compare/v5.4.8...v5.4.9

typia - v5.4.8

Published by samchon 8 months ago

What's Changed

Full Changelog: https://github.com/samchon/typia/compare/v5.4.7...v5.4.8

typia - v5.4.7

Published by samchon 9 months ago

What's Changed

Full Changelog: https://github.com/samchon/typia/compare/v5.4.6...v5.4.7

typia - v5.4.6

Published by samchon 9 months ago

What's Changed

Full Changelog: https://github.com/samchon/typia/compare/v5.4.5...v5.4.6

typia - v5.4.5

Published by samchon 9 months ago

What's Changed

Full Changelog: https://github.com/samchon/typia/compare/v5.4.4...v5.4.5

typia - v5.4.4

Published by samchon 9 months ago

Added more format tags like below.

export interface TypeTagFormat {
  // SPECIAL CHARACTERS
  byte: string & tags.Format<"byte">;
  password: string & tags.Format<"password">;
  regex: string & tags.Format<"regex">;
  uuid: string & tags.Format<"uuid">;

  // ADDRESSES
  email: string & tags.Format<"email">;
  hostname: string & tags.Format<"hostname">;
  idnEmail: string & tags.Format<"idn-email">;
  idnHostname: string & tags.Format<"idn-hostname">;
  iri: string & tags.Format<"iri">;
  iriReference: string & tags.Format<"iri-reference">;
  ipv4: string & tags.Format<"ipv4">;
  ipv6: string & tags.Format<"ipv6">;
  uri: string & tags.Format<"uri">;
  uriReference: string & tags.Format<"uri-reference">;
  uriTemplate: string & tags.Format<"uri-template">;
  url: string & tags.Format<"url">;

  // TIMESTAMPS
  datetime: string & tags.Format<"date-time">;
  date: string & tags.Format<"date">;
  time: string & tags.Format<"time">;
  duration: string & tags.Format<"duration">;

  // POINTERS
  jsonPointer: string & tags.Format<"json-pointer">;
  relativeJsonPointer: string & tags.Format<"relative-json-pointer">;
}

Also, new function typia.http.assertFormData<T>(input: FormData): Resolved<T> function added.

With the function, you can parse the FormData instance even including the Blob or File property.

import typia, { tags } from "typia";

interface ObjectHttpFormData {
  id: string & tags.Format<"uuid">;
  strings: string[];
  number: number;
  integers: Array<number & tags.Type<"int32">>;
  blob: Blob;
  blobs: Blob[];
  file: File;
  files: File[];
}
const data: ObjectHttpFormData = typia.http.assertFormData<ObjectHttpFormData>();

What's Changed

Full Changelog: https://github.com/samchon/typia/compare/v5.3.12...v5.4.4

typia - v5.4.3

Published by samchon 9 months ago

Added more format tags like below.

export interface TypeTagFormat {
  // SPECIAL CHARACTERS
  byte: string & tags.Format<"byte">;
  password: string & tags.Format<"password">;
  regex: string & tags.Format<"regex">;
  uuid: string & tags.Format<"uuid">;

  // ADDRESSES
  email: string & tags.Format<"email">;
  hostname: string & tags.Format<"hostname">;
  idnEmail: string & tags.Format<"idn-email">;
  idnHostname: string & tags.Format<"idn-hostname">;
  iri: string & tags.Format<"iri">;
  iriReference: string & tags.Format<"iri-reference">;
  ipv4: string & tags.Format<"ipv4">;
  ipv6: string & tags.Format<"ipv6">;
  uri: string & tags.Format<"uri">;
  uriReference: string & tags.Format<"uri-reference">;
  uriTemplate: string & tags.Format<"uri-template">;
  url: string & tags.Format<"url">;

  // TIMESTAMPS
  datetime: string & tags.Format<"date-time">;
  date: string & tags.Format<"date">;
  time: string & tags.Format<"time">;
  duration: string & tags.Format<"duration">;

  // POINTERS
  jsonPointer: string & tags.Format<"json-pointer">;
  relativeJsonPointer: string & tags.Format<"relative-json-pointer">;
}

Also, new function typia.http.assertFormData<T>(input: FormData): Resolved<T> function added.

With the function, you can parse the FormData instance even including the Blob or File property.

import typia, { tags } from "typia";

interface ObjectHttpFormData {
  id: string & tags.Format<"uuid">;
  strings: string[];
  number: number;
  integers: Array<number & tags.Type<"int32">>;
  blob: Blob;
  blobs: Blob[];
  file: File;
  files: File[];
}
const data: ObjectHttpFormData = typia.http.assertFormData<ObjectHttpFormData>();

What's Changed

Full Changelog: https://github.com/samchon/typia/compare/v5.3.12...v5.4.3

typia - v5.4.1

Published by samchon 9 months ago

Added more format tags like below.

export interface TypeTagFormat {
  // SPECIAL CHARACTERS
  byte: string & tags.Format<"byte">;
  password: string & tags.Format<"password">;
  regex: string & tags.Format<"regex">;
  uuid: string & tags.Format<"uuid">;

  // ADDRESSES
  email: string & tags.Format<"email">;
  hostname: string & tags.Format<"hostname">;
  idnEmail: string & tags.Format<"idn-email">;
  idnHostname: string & tags.Format<"idn-hostname">;
  iri: string & tags.Format<"iri">;
  iriReference: string & tags.Format<"iri-reference">;
  ipv4: string & tags.Format<"ipv4">;
  ipv6: string & tags.Format<"ipv6">;
  uri: string & tags.Format<"uri">;
  uriReference: string & tags.Format<"uri-reference">;
  uriTemplate: string & tags.Format<"uri-template">;
  url: string & tags.Format<"url">;

  // TIMESTAMPS
  datetime: string & tags.Format<"date-time">;
  date: string & tags.Format<"date">;
  time: string & tags.Format<"time">;
  duration: string & tags.Format<"duration">;

  // POINTERS
  jsonPointer: string & tags.Format<"json-pointer">;
  relativeJsonPointer: string & tags.Format<"relative-json-pointer">;
}

What's Changed

Full Changelog: https://github.com/samchon/typia/compare/v5.3.12...v5.4.1

typia - v5.3.12

Published by samchon 9 months ago

@EloB has contributed typia to generate much less bundling sized code by optimizing to be tree shaking friendly.

According to his claim, the patch reduces the bundling size about 90% down.

Thanks for his smart contribution, and let's wait his next module esbuild plugin for typia.

What's Changed

New Contributors

Full Changelog: https://github.com/samchon/typia/compare/v5.3.11...v5.3.12

typia - v5.3.11

Published by samchon 9 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/samchon/typia/compare/v5.3.10...v5.3.11

typia - v5.3.10

Published by samchon 9 months ago

What's Changed

Full Changelog: https://github.com/samchon/typia/compare/v5.3.9...v5.3.10

typia - v5.3.9

Published by samchon 10 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/samchon/typia/compare/v5.3.8...v5.3.9

typia - v5.3.8

Published by samchon 10 months ago

Made JSON schema lighten for LLM reason.

What's Changed

Full Changelog: https://github.com/samchon/typia/compare/v5.3.7...v5.3.8

typia - v5.3.7

Published by samchon 10 months ago

What's Changed

Full Changelog: https://github.com/samchon/typia/compare/v5.3.6...v5.3.7

typia - v5.3.6

Published by samchon 10 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/samchon/typia/compare/v5.3.5...v5.3.6

typia - v5.3.5

Published by samchon 10 months ago

What's Changed

Full Changelog: https://github.com/samchon/typia/compare/v5.3.4...v5.3.5

typia - v5.3.4

Published by samchon 11 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/samchon/typia/compare/v5.3.2...v5.3.4

typia - v5.3.2

Published by samchon 11 months ago

What's Changed

Full Changelog: https://github.com/samchon/typia/compare/v5.3.1...v5.3.2

typia - v5.3.1

Published by samchon 11 months ago

Starts supporting TypeScript v5.3 update.

Since TypeScript v5.3 update, it no more parses JSDocComments from the tsc command and it damages on the "Comment Tags" and "JSON schema generator" features. By the way, as update of ts-patch for the TypeScript v5.3 update is delaying, I've patched the TypeScript module by myself. The new cli command npx typia patch is the thing reviving JSDocComment feature from tsc.

For reference, typia setup command also does the same behavior.

Detailed content about that

https://typia.io/docs/setup/#manual-setup

What's Changed

New Contributors

Full Changelog: https://github.com/samchon/typia/compare/v5.2.6...v5.3.1

typia - v5.2.6

Published by samchon 12 months ago

What's Changed

Full Changelog: https://github.com/samchon/typia/compare/v5.2.5...v5.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