UNPKG

@featurevisor/core

Version:

Core package of Featurevisor for Node.js usage

32 lines 882 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parsers = void 0; const YAML = require("js-yaml"); /** * If we want to add more built-in parsers, * add them to this object with new file extension as the key, * and a function that takes file content as string and returns parsed object as the value. */ exports.parsers = { // YAML yml: { extension: "yml", parse: function (content) { return YAML.load(content); }, stringify: function (content) { return YAML.dump(content); }, }, // JSON json: { extension: "json", parse: function (content) { return JSON.parse(content); }, stringify: function (content) { return JSON.stringify(content, null, 2); }, }, }; //# sourceMappingURL=parsers.js.map