UNPKG

452 BPlain TextView Raw
1#!/usr/bin/env node
2
3const update = require("../verify/update");
4
5const { original: npmArgs = [] } = JSON.parse(process.env.npm_config_argv || "{}");
6const [, , ...processArgs ] = process.argv;
7
8const flags = [ ...npmArgs, ...processArgs ]
9 .filter(f => f.startsWith("--"))
10 .map(f => f.substring(2));
11
12function addOption(all, current) {
13 all[current] = true;
14 return all;
15}
16
17const options = flags.reduce(addOption, {});
18
19update(options);
20