url-to-path
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -37,3 +37,9 @@ #!/usr/bin/env node | ||
function usage() { | ||
module.exports = function () { | ||
var _module$exports; | ||
return (_module$exports = module.exports).main.apply(_module$exports, arguments); | ||
}; | ||
module.exports.usage = function usage() { | ||
return commandLineUsage([{ | ||
@@ -48,7 +54,8 @@ header: `${PACKAGE.name}@${PACKAGE.version}`, | ||
}]); | ||
} | ||
}; | ||
function main$1() { | ||
module.exports.main = function main() { | ||
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { help: true }; | ||
const usage = module.exports.usage; | ||
if (typeof options === 'string') { | ||
@@ -77,7 +84,7 @@ options = { url: options }; | ||
return path.join.apply(path, [options.output.path, p.host || '.', p.path].concat(suffix)); | ||
} | ||
}; | ||
if (require.main === module) { | ||
const options = commandLineArgs(optionDefinitions); | ||
const result = main$1(options); | ||
const result = module.exports.main(options); | ||
if (typeof result === 'number') { | ||
@@ -92,3 +99,1 @@ if (result !== 0) { | ||
} | ||
export { main$1 as main };export default main$1; |
{ | ||
"name": "url-to-path", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Convert a URL to a local path, wget-style.", | ||
"main": "lib/index.js", | ||
"main": "src/index.js", | ||
"browser": "./browser.js", | ||
"module": "lib/index.es.js", | ||
"bin": { | ||
"url-to-path": "lib/index.js" | ||
"url-to-path": "src/cli.js" | ||
}, | ||
"files": [ | ||
"lib/index.js", | ||
"src/index.js", | ||
"lib/index.es.js", | ||
@@ -14,0 +14,0 @@ "browser.js" |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
8029
223
1