mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-18 15:00:00 +00:00
23 lines
358 B
TypeScript
23 lines
358 B
TypeScript
![]() |
import YAML from "yawn-yaml/cjs";
|
||
|
import { load } from "js-yaml";
|
||
|
|
||
|
const src = `
|
||
|
prefix: '!'
|
||
|
|
||
|
plugins:
|
||
|
myplugin:
|
||
|
config:
|
||
|
|
||
|
can_do_thing: true
|
||
|
|
||
|
# Lol
|
||
|
can_do_other_thing: false
|
||
|
`;
|
||
|
|
||
|
const json = load(src);
|
||
|
const yaml = new YAML(src);
|
||
|
json.plugins.myplugin.config.can_do_thing = false;
|
||
|
yaml.json = json;
|
||
|
|
||
|
console.log(yaml.yaml);
|