1
0
silverbullet/common/syscalls/yaml.ts
Zef Hemel 0313565610
Complete redo of content indexing and querying (#517)
Complete redo of data store
Introduces live queries and live templates
2023-10-03 14:16:33 +02:00

17 lines
415 B
TypeScript

import { SysCallMapping } from "../../plugos/system.ts";
import { YAML } from "../../web/deps.ts";
export function yamlSyscalls(): SysCallMapping {
return {
"yaml.parse": (_ctx, text: string): any => {
return YAML.parse(text);
},
"yaml.stringify": (_ctx, obj: any): string => {
return YAML.stringify(obj, {
noArrayIndent: true,
noCompatMode: true,
});
},
};
}