feat: refactor and test tools steps utilities (#42693)

This commit is contained in:
Victor Duarte
2021-07-06 19:22:12 -05:00
committed by GitHub
parent 9e883e49ba
commit 82d09bd593
36 changed files with 855 additions and 207 deletions

View File

@ -0,0 +1,16 @@
const fs = require('fs');
// Process the contents of a argument (json) to an Object
function getMetaData(file) {
let metaData;
try {
metaData = fs.readFileSync(file);
} catch (err) {
throw `No _meta.json file exists at ${file}`;
}
return JSON.parse(metaData);
}
exports.getMetaData = getMetaData;