Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

parse-database-url

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse-database-url - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

6

lib/parse-database-url.js

@@ -46,3 +46,7 @@ var url = require("url");

} else {
config.database = parsedUrl.pathname.replace(/^\//, "").replace(/\/$/, "");
// Some drivers (e.g., redis) don't have database names.
if (parsedUrl.pathname) {
config.database =
parsedUrl.pathname.replace(/^\//, "").replace(/\/$/, "");
}

@@ -49,0 +53,0 @@ if (parsedUrl.hostname) config.host = parsedUrl.hostname;

2

package.json
{
"name": "parse-database-url",
"version": "0.2.0",
"version": "0.2.1",
"description": "Database configuration URL parser for node.js",

@@ -5,0 +5,0 @@ "keywords": ["database", "configuration", "url", "heroku", "database_url"],

@@ -71,3 +71,12 @@ [

}
},
{
"desc": "Redis URL, which doesn't have a path (Issue #4)",
"url": "redis://localhost:6379",
"config": {
"driver": "redis",
"host": "localhost",
"port": "6379"
}
}
]
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc