6.3.4 • Published 3 months ago

vality v6.3.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

A TypeScript schema descriptor library with zero dependencies.

License Version Build Status Coverage Status

Snyk Dependencies Bundlephobia

See https://jeengbe.github.io/vality for more information.

Vality is the heart of this repository. It is a declarative schema description library with the most intuitive syntax and allows for validation and transformation of data. Then extract the types from your schema for 100% type safety. And all with 0 runtime dependencies.

Find all of this and much more on https://jeengbe.github.io/vality/vality.

import { v, Parse } from "vality";

const Person = {
  name: v.string,
  age: v.number({ min: 6 }),
  email: v.email,
  referral: ["friends", "ad", "media", null],
  languages: [["de", "en", "fr", "se"]],
} as const;

type Person = Parse<typeof Person>;
/* {
  name: string;
  age: number;
  email: Email;
  referral: "friends" | "ad" | "media" | null;
  languages: ("de" | "en" | "fr" | "se")[];
} */

Now that I have your attention, head over to https://jeengbe.github.io/vality/vality to find out what's going on here. You won't regret it ;)

Or head to GitHub to find more useful packages (such as Vality ESLint Plugin).

And before you complain about errors, make sure your tsconfig supports at least the following:

{
  "compilerOptions": {
    "strictNullChecks": true,
    "lib": ["ES2015"]
  }
}
6.3.4

3 months ago

6.3.3

11 months ago

6.3.2

1 year ago

6.1.0

1 year ago

6.3.0

1 year ago

6.1.1

1 year ago

6.3.1

1 year ago

6.0.1

1 year ago

6.0.0

1 year ago

6.2.1

1 year ago

6.0.3

1 year ago

6.2.0

1 year ago

6.0.2

1 year ago

6.2.2

1 year ago

5.1.2

2 years ago

5.1.1

2 years ago

5.1.0

2 years ago

3.4.0

2 years ago

3.2.2

2 years ago

3.2.1

2 years ago

3.2.3

2 years ago

4.0.0

2 years ago

5.0.9

2 years ago

5.0.8

2 years ago

5.0.7

2 years ago

5.2.4

2 years ago

5.0.6

2 years ago

5.2.3

2 years ago

5.0.5

2 years ago

5.2.2

2 years ago

5.0.4

2 years ago

5.2.1

2 years ago

5.0.3

2 years ago

5.2.0

2 years ago

5.0.2

2 years ago

5.0.1

2 years ago

5.0.10

2 years ago

5.0.0

2 years ago

5.0.11

2 years ago

3.3.0

2 years ago

3.5.3

2 years ago

3.5.2

2 years ago

3.5.1

2 years ago

3.5.0

2 years ago

4.1.0

2 years ago

3.2.0

2 years ago

3.1.0

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

2.3.0

2 years ago

2.2.0

2 years ago

2.1.2

2 years ago

2.1.1

2 years ago

2.1.0

2 years ago

2.0.3

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.1.1

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.4.0

2 years ago

1.3.0

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago

0.1.0

2 years ago