2023-05-23 18:53:53 +00:00
|
|
|
import { SysCallMapping } from "../../plugos/system.ts";
|
|
|
|
import { YAML } from "../deps.ts";
|
|
|
|
|
|
|
|
export function yamlSyscalls(): SysCallMapping {
|
|
|
|
return {
|
|
|
|
"yaml.parse": (_ctx, text: string): any => {
|
|
|
|
return YAML.parse(text);
|
|
|
|
},
|
|
|
|
"yaml.stringify": (_ctx, obj: any): string => {
|
2023-08-23 17:08:21 +00:00
|
|
|
return YAML.stringify(obj, {
|
|
|
|
noArrayIndent: true,
|
|
|
|
noCompatMode: true,
|
|
|
|
});
|
2023-05-23 18:53:53 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
}
|