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

When changing data, you can only overwrite the top-level key/value #20

Open
mikrostew opened this issue Oct 29, 2020 · 0 comments
Open
Labels
bug Something isn't working

Comments

@mikrostew
Copy link
Owner

It would be nice to be able to add/change data at levels other than just the top level.

For example:

const yamlFM = require('yaml-fromat');

yamlFM.writeString(
`---
foo:
  bar: baz
  bam: boom
---

Some other things`,
`foo:
  bam: bam`
).then(console.log);

// ---
// foo:
//   bar: baz
//   bam: bam
// ---
//
// Some other things

Note: This will probably need an option to merge instead of overwrite

@mikrostew mikrostew added the bug Something isn't working label Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant