# @piing/io-types

> Essential io types using io-ts

Latest version **1.1.1** (published 2019-10-15) · mit license · 0 weekly downloads

## Install

```sh
npm install @piing/io-types
pnpm add @piing/io-types
yarn add @piing/io-types
bun add @piing/io-types
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2019-10-15 |
| First published | 2019-07-10 |
| Weekly downloads | 0 |
| License | mit |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 490.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jørn Andre Tangen @gorillatron |
| Maintainers | dtudorache-clarisoft, gorillatron, piing_admin |
| Keywords | types, encoding, io, io-ts |

## Links

- npm: https://www.npmjs.com/package/@piing/io-types
- Repository: https://github.com/piing-as/sevensense-sdk
- Homepage: https://github.com/piing-as/sevensense-sdk#readme
- Issues: https://github.com/piing-as/sevensense-sdk/issues
- npm.io page: https://npm.io/package/@piing/io-types

## Dependencies (2)

- [fp-ts](https://npm.io/package/fp-ts.md) ^2.1.0
- [io-ts](https://npm.io/package/io-ts.md) ^2.0.1

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2019-10-15
- 1.1.0 — 2019-10-10
- 1.0.2 — 2019-10-10
- 1.0.1 — 2019-09-04
- 1.0.0 — 2019-09-03
- 0.0.4 — 2019-09-03
- 0.0.31 — 2019-09-02
- 0.0.3 — 2019-09-02
- 0.0.22 — 2019-07-10
- 0.0.21 — 2019-07-10
- 0.0.2 — 2019-07-10
- 0.0.1 — 2019-07-10

## README

# @piing/io-types

A sellection of essential io-ts types for decoding io like url queries and such.

## Install
```bash
npm i @piing/io-types
```

### Examples

```typescript

import * as io from "io-ts"

import { ArrayFromJSONString } from "@piing/io-types/lib/ArrayFromJSONString"
import { Nullable } from "@piing/io-types/lib/Nullable"
import { YesNoBool } from "@piing/io-types/lib/YesNoBool"


const JSONNumberArray = ArrayFromJSONString(io.number);
const JSONStringArray = ArrayFromJSONString(io.string);

JSONNumberArray.decode("[1,2,3]") // right [1,2,3]
JSONStringArray.decode(`["foo", "bar"]`) // right ["foo", "bar"]


const NullableNumber = Nullable(io.number)

NullableNumber.decode(null) // right null
NullableNumber.decode(1) // right 1


YesNoBool.decode("yes") // right true
YesNoBool.decode("no") // right false

```

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