# json-schema-poet

> [JSON Schema](https://json-schema.org) is a useful way to define input and output schemas.

Latest version **0.0.9** (published 2019-09-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install json-schema-poet
pnpm add json-schema-poet
yarn add json-schema-poet
bun add json-schema-poet
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.9 |
| Published | 2019-09-27 |
| First published | 2019-09-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 42.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | meeshkan |

## Links

- npm: https://www.npmjs.com/package/json-schema-poet
- npm.io page: https://npm.io/package/json-schema-poet

## Dependencies (3)

- [fp-ts](https://npm.io/package/fp-ts.md) ^2.0.5
- [io-ts](https://npm.io/package/io-ts.md) ^2.0.1
- [json-schema-strictly-typed](https://npm.io/package/json-schema-strictly-typed.md) ^0.0.14

## Recent versions

- 0.0.9 (latest) — 2019-09-27
- 0.0.8 — 2019-09-12
- 0.0.6 — 2019-09-06
- 0.0.5 — 2019-09-06
- 0.0.4 — 2019-09-06
- 0.0.3 — 2019-09-06
- 0.0.2 — 2019-09-05
- 0.0.1 — 2019-09-03
- 0.0.0 — 2019-09-02

## README

# json-schema-poet

[JSON Schema](https://json-schema.org) is a useful way to define input and output schemas.

Typescript is a useful way to verify the types of JavaScript objects.

`json-schema-strictly-poet` Write JSON Schema like you'd write poetry.

## Example

```typescript
import * as jsp from "json-schema-poet";

test("integer yields number schema", () => {
  expect(jsp.integer()).toEqual({ type: "integer" });
});
```

## API

Here are all of the functions in the API.

* `nul()`
* `cnst()`
* `integer()`
* `number()`
* `string()`
* `stringEnum()`
* `numberEnum()`
* `integerEnum()`
* `regex()`
* `boolean()`
* `array()`
* `tuple()`
* `allOf()`
* `anyOf()`
* `oneOf()`
* `not()`
* `dictionary()`
* `type()`
* `object()`
* `extend()`

## Todo

There is plenty of stuff that is not implemented yet.  I'd really appreciate your help!

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