-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Add YAML std module #3361
Add YAML std module #3361
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
It's a lot of code, but I guess YAML is just a wildly complicated specification.
It's nice you've ported this all to TypeScript! Thanks - this is great to have!
Any thoughts/reasons why |
Well ; in term of date of creation, number of stars, stability, and number of download per weeks, js-yaml is way before any other yaml lib https://www.npmtrends.com/js-yaml-vs-yaml |
Yea, I know, was just wondering. Okay, then wouldn't it better to expose different (and I think more intuitive) API and don't inherit it from |
That's what I've done: Line 6 in 2cd22b5
Both endpoint types are available. Including classical |
Setup YAML module as it was made in denoland/std#528.
This a a port from nodeca/js-yaml.
Typing internally is quite messy but the endpoints themselves (parse and stringify) are ready to use.
deno fmt
is okdeno test
is okAdditional tests from original repo's old issues are not usable as they mainly use third party library not yet ported in deno.
Like in this test: https://github.com/nodeca/js-yaml/blob/665aadda42349dcae869f12040d9b10ef18d12da/test/25-dumper-fuzzy.js#L4 where the
fast-check
lib is used.