Socket
Socket
Sign inDemoInstall

url-to-path

Package Overview
Dependencies
18
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.5 to 0.0.6

src/index.js

19

lib/index.es.js

@@ -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"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc