-
Notifications
You must be signed in to change notification settings - Fork 312
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
feat: Add Cl.parse
Clarity value parser
#1681
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Cl.parse
clarity value parser
1197407
to
661f7a8
Compare
Cl.parse
clarity value parserCl.parse
Clarity value parser
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.
I tried it and found this use case that throws a parse error:
{ a: 0x68656c6c6f21 }
@hugocaillard Good catch, noticed that nested values will be tricky with overlaps. I thought the In this case it was detecting the |
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 🚀
Cl.parse
, which allows us to parse clarity syntax as JS representationClarityValue
.prettyPrint
tostringify
(matchingJSON.
more closely in naming) got feedback from users that they were expectingprettyPrint
toconsole.log
and they were confused that there wasn't any output.Examples