mirror of
https://github.com/barkeser2002/mcsleepingserverstarter.git
synced 2026-09-25 09:56:00 +03:00
16 lines
747 B
JavaScript
16 lines
747 B
JavaScript
const yaml = require('js-yaml');
|
|
const json5 = require('json5');
|
|
|
|
module.exports = {
|
|
parseJSON5: (str) => json5.parse(str),
|
|
stringifyJSON5: (obj, opts) => json5.stringify(obj, opts),
|
|
parseYAML: (str) => yaml.load(str),
|
|
stringifyYAML: (obj, opts) => yaml.dump(obj, opts),
|
|
parseJSON: (str) => JSON.parse(str),
|
|
stringifyJSON: (obj, opts) => JSON.stringify(obj, null, opts?.indent || 2),
|
|
parseINI: (str) => { throw new Error('parseINI not implemented in shim'); },
|
|
stringifyINI: (obj, opts) => { throw new Error('stringifyINI not implemented in shim'); },
|
|
parseTOML: (str) => { throw new Error('parseTOML not implemented in shim'); },
|
|
stringifyTOML: (obj, opts) => { throw new Error('stringifyTOML not implemented in shim'); },
|
|
};
|