Utils example

This commit is contained in:
2021-10-17 11:08:40 -07:00
parent 12df54b344
commit c2bbaad5dd
12 changed files with 272 additions and 58 deletions

12
tools/utils/args.js Normal file
View File

@ -0,0 +1,12 @@
const args = process.argv.splice(2).reduce((x,y) => {
const bits = y.split('=');
const name = bits[0].replace('--', '');
const val = bits[1];
x[name] = val;
return x;
}, {});
module.exports = {
args
};