1.0.1 • Published 5 years ago
js-yaml-type-data v1.0.1
js-yaml-type-data
Use it like this:
import createDataType from 'js-yaml-type-data'
const type = createDataType({
relativeTo: './path', // is optional and defaults to the current directory
})
const schema = new yaml.Schema({
include: [yaml.DEFAULT_SAFE_SCHEMA],
explicit: [type],
})
const parsed = yaml.load(`
includedPNG: !!data "file.png"
`, { schema })