Skip to content

Instantly share code, notes, and snippets.

@rigelk
Created April 26, 2018 12:40
Show Gist options
  • Save rigelk/605b034a83bf9465ef1df296a1d7795d to your computer and use it in GitHub Desktop.
Save rigelk/605b034a83bf9465ef1df296a1d7795d to your computer and use it in GitHub Desktop.
/*
we check feed validity using:
- XSD for RSS 2.0 -> https://raw.githubusercontent.com/ultraq/rss-xml-generator/master/Schema/RSS-2.0.xsd
- JSON Schema for… JSON Feed -> https://raw.githubusercontent.com/sonicdoe/jsonfeed-schema/master/schema-v1.json
*/
const JSONFeedInstanceJSONSchema = require('jsonfeed-schema')
JSONFeedInstanceJSONSchema.properties.items.items.additionalProperties = true
async function loadXSD (path): Promise<string> {
const file = await readFileBufferPromise(path)
return file.toString()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment