I can find it supports loadDocumentSync, which accepts filepath as input . what about adding support for string in case the doc is aleady in the memory?
e.g.
for yamljs it has YAML.parse ans YAML.load
for yaml it has YAML.parse only but you can read file first, thus we still can deal with both file & string.
The currently version uses yamljs and only implements YAML.load, I can load from file, but cannot do it the other way.
I can find it supports
loadDocumentSync
, which accepts filepath as input . what about adding support for string in case the doc is aleady in the memory?e.g. for
yamljs
it hasYAML.parse
ansYAML.load
foryaml
it hasYAML.parse
only but you can read file first, thus we still can deal with both file & string.The currently version uses
yamljs
and only implementsYAML.load
, I can load from file, but cannot do it the other way.