ssb-invite-schema

0.0.10 • Public • Published

ssb-invite-schema

Validations for type invite and reply for ssb messages.

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)) {
    // ...
  }
})

Readme

Keywords

none

Package Sidebar

Install

npm i ssb-invite-schema

Weekly Downloads

0

Version

0.0.10

License

ISC

Unpacked Size

10.9 kB

Total Files

16

Last publish

Collaborators

  • kyphae