jsonfeed-validator

0.2.0 • Public • Published

jsonfeed-validator

Node.js package Build status

JSON Feed validator

Installation

$ npm install jsonfeed-validator --save

Usage

const validate = require('jsonfeed-validator')
 
const feed = {
  version: 'https://jsonfeed.org/version/1',
  title: 'My Example Feed',
  home_page_url: 'https://example.org/',
  feed_url: 'https://example.org/feed.json',
  items: [
    {
      content_html: '<p>Hello, world!</p>',
      url: 'https://example.org/initial-post'
    }
  ]
}
 
const results = validate(feed)
/*
  [
    'should have required property \'id\' at path \'.items[0]\''
  ]
*/

API

validate(feed)

feed

Type: object

JSON Feed to be validated.

Package Sidebar

Install

npm i jsonfeed-validator

Weekly Downloads

6

Version

0.2.0

License

ISC

Last publish

Collaborators

  • sonicdoe