# ssb-invite-schema

> Schema for ssb invite types

Latest version **0.0.10** (published 2018-07-31) · ISC license · 0 weekly downloads

## Install

```sh
npm install ssb-invite-schema
pnpm add ssb-invite-schema
yarn add ssb-invite-schema
bun add ssb-invite-schema
```

## 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.10 |
| Published | 2018-07-31 |
| First published | 2018-07-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 10.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | kyphae |
| Maintainers | kyphae |

## Links

- npm: https://www.npmjs.com/package/ssb-invite-schema
- Repository: https://github.com/ssbc/ssb-invite-schema
- Homepage: https://github.com/ssbc/ssb-invite-schema#readme
- Issues: https://github.com/ssbc/ssb-invite-schema/issues
- npm.io page: https://npm.io/package/ssb-invite-schema

## Dependencies (6)

- [depject](https://npm.io/package/depject.md) ^4.1.1
- [depnest](https://npm.io/package/depnest.md) ^1.3.0
- [ssb-ref](https://npm.io/package/ssb-ref.md) ^2.11.1
- [ssb-msg-content](https://npm.io/package/ssb-msg-content.md) ^1.0.1
- [is-my-json-valid](https://npm.io/package/is-my-json-valid.md) ^2.17.2
- [ssb-schema-definitions](https://npm.io/package/ssb-schema-definitions.md) ^1.0.8

## Recent versions

- 0.0.10 (latest) — 2018-07-31
- 0.0.9 — 2018-07-31
- 0.0.8 — 2018-07-30

## README

# ssb-invite-schema

Validations for type `invite` and `reply` for ssb messages.

```js
const { isInvite, isReply } = require('ssb-invite-schema')

// Get something from your database
server.get(key, (err, msg) => {
  const { content } = msg.value

  // Check if its an invite according to JSON schema
  if(isInvite(content)) {
    // ...
  }

  // Check if its an invite reply according to JSON schema
  if (isReply(content)) {
    // ...
  }
})
```

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