git.schokokeks.org
Repositories
Help
Report an Issue
fs-draft.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
d6012ba
Branches
Tags
master
midgard
vorlage
fs-draft.git
tools
join.js
fast vollständig
Christian Fraß
commited
d6012ba
at 2018-08-22 18:04:02
join.js
Blame
History
Raw
const _fs = require("fs"); let data_master = {}; const dir_source = process.argv[2]; _fs.readdir( dir_source, (error, names) => { names.forEach( (name) => { const path = (dir_source + "/" + name); const content = _fs.readFileSync(path); const data_segment = JSON.parse(content); const key = name.split(".")[0]; data_master[key] = data_segment; } ); console.info(JSON.stringify(data_master)); } );