Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YAMLException: Specified list of YAML types (or a single Type object) contains a non-Type object #6

Open
Epikest opened this issue Nov 5, 2022 · 0 comments

Comments

@Epikest
Copy link

Epikest commented Nov 5, 2022

using es6 named import, is there something i'm doing wrong here?

import yaml from "js-yaml"
import { all as unsafe } from "js-yaml-js-types"

const schema = yaml.DEFAULT_SCHEMA.extend(unsafe)
const src = `
- !!js/regexp /pattern/gim
- !!js/undefined ''
- !!js/function 'function () { return true }'
`

yaml.load(src, { schema })

https://jsfiddle.net/oxt2pmaf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant