We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'd love to be able to do fm.serialize(attributes, body).
fm.serialize(attributes, body)
This should work:
const metadata = {foo: "bar"} const payload = "Hi there!" const combined = fm.serialize(metadata, payload) const parsed = fm(combined); assert(JSON.stringify(parsed.attributes) === JSON.stringify(metadata)) assert(parsed.body === payload)
The text was updated successfully, but these errors were encountered:
And, it should use yaml.safeDump. So, perhaps to be complete, this should work too:
yaml.safeDump
const metadata = {match: "!!js/regexp /pattern/gim"} const payload = "Hi there!" const combined = fm.serialize(metadata, payload, {unsafe: true} ) // Or something const parsed = fm(combined); assert(JSON.stringify(parsed.attributes) === JSON.stringify(metadata)) assert(parsed.body === payload)
Sorry, something went wrong.
No branches or pull requests
I'd love to be able to do
fm.serialize(attributes, body)
.This should work:
The text was updated successfully, but these errors were encountered: