UNPKG

kraft

Version:

A mysterious command line game with lots of secrets

19 lines (13 loc) 410 B
const fs = require('fs'); const os = require('os'); const pck = require('../../package.json'); const cnf = require('../../config.json'); exports.version = pck.version; exports.resourceRate = cnf.resourceRate; exports.save = (what, data) => { const result = { "model": (data) => { fs.writeFileSync(os.homedir()+'/.kraft-save', JSON.stringify(data)); } }[what](data); };