# convince

> Type safe schema validation library.

Latest version **0.1.2** (published 2023-10-16) · UNLICENSED license · 0 weekly downloads

## Install

```sh
npm install convince
pnpm add convince
yarn add convince
bun add convince
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2023-10-16 |
| First published | 2022-12-22 |
| Weekly downloads | 0 |
| License | UNLICENSED |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 19.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Mark Murray |
| Maintainers | mmmurray |
| Keywords | schema, validation, typescript |

## Links

- npm: https://www.npmjs.com/package/convince
- Repository: git@github.com:mmmurray/convince
- npm.io page: https://npm.io/package/convince

## Alternatives

- [@regle/core](https://npm.io/package/@regle/core.md) — 47.0K weekly downloads
- [typeof-arguments](https://npm.io/package/typeof-arguments.md) — 12.5K weekly downloads
- [@lokalise/projects-engine-contracts](https://npm.io/package/@lokalise/projects-engine-contracts.md) — 978 weekly downloads
- [@osjwnpm/nam-laboriosam-quibusdam](https://npm.io/package/@osjwnpm/nam-laboriosam-quibusdam.md) — 70 weekly downloads
- [@oridune/validator](https://npm.io/package/@oridune/validator.md) — 16 weekly downloads

## Recent versions

- 0.1.2 (latest) — 2023-10-16
- 0.1.1 — 2022-12-22
- 0.1.0 — 2022-12-22

## README

# Convince

Type safe schema validation library. Lightweight alternative to [Zod](https://github.com/colinhacks/zod).

## Install

```console
yarn add convince
```

Or

```console
npm i convince
```

## Usage

```ts
import { s, SchemaType } from 'convince';

const thingSchema = s.object({
  foo: s.string(),
  bar: s.number().optional(),
  baz: s.boolean(),
});

type Thing = SchemaType<typeof thingSchema>;

const thingResult = thingSchema.parse({
  foo: 'Hello',
  baz: true,
});

if (thingResult.ok) {
  console.log(thingResult.data.foo);
}
```

---
_Source: https://npm.io/package/convince · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
