parse-database-url
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -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; |
{ | ||
"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" | ||
} | ||
} | ||
] |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
8012
151
0