How to use the jomini.parse function in jomini

To help you get started, we’ve selected a few jomini examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jakubjafra / stellaris-map-generation / sav2json.js View on Github external
const fs = require('fs');
const jomini = require('jomini');
const handleBasics = require('./data-parser/basics.js');

const fileToProcess = process.argv[2];
const outputDir = process.argv[3] || "./tmp";

const file = fs.readFileSync(fileToProcess).toString();

let save = jomini.parse(file);
fs.writeFileSync(`${outputDir}/gamestate.json`, JSON.stringify(save));

const basics = handleBasics(save);
fs.writeFileSync(`${outputDir}/basics.json`, JSON.stringify(basics));

jomini

Parses Paradox files into javascript objects

MIT
Latest version published 12 months ago

Package Health Score

61 / 100
Full package analysis

Popular jomini functions