const Exp = {}; Exp.Fs = require('fs'); Exp.ConfigParser = require('./config-ini-parser').ConfigIniParser; // https://stackoverflow.com/a/69049676 Exp.importAll = function importAll(){ delete this.importAll; Object.assign(global, this); }; Exp.ParseMeta = (Raw) => { let Mid = { Meta: "", Macros: "", }; let Data = { Meta: {}, Macros: {}, }; const Lines = Raw.trim().split('\n'); for (let i=0; i { const Items = new ConfigParser().parse(Mid[Type]).items(); Items.forEach((Item) => { Data[Type][Item[0]] = Item[1]; }); }); return Data; }; module.exports = Exp;