浏览代码

remove kebab-case option names

Gildas 5 年之前
父节点
当前提交
2945fed813
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      cli/single-file

+ 2 - 0
cli/single-file

@@ -30,6 +30,8 @@ const fs = require("fs");
 run(require("./args"));
 
 async function run(options) {
+	Object.keys(options).filter(optionName => optionName.includes("-"))
+		.forEach(optionName => delete options[optionName]);
 	const singlefile = await require("./single-file-cli-api")(options);
 	let urls;
 	if (options.url && !singlefile.VALID_URL_TEST.test(options.url)) {