Package Exports
- connection-string
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (connection-string) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
connection-string
URL Connection String Parser - for all browsers and Node.js versions.
Takes a URL connection string:
protocol://user:password@hostname:port/segment1/segment2?param1=value1¶m2=value2and converts it into an object:
{
protocol: 'protocol',
user: 'user',
password: 'password',
host: 'hostname:port',
hostname: 'hostname',
port: 'port',
segments: ['segment1', 'segment2'],
params: {
param1: 'value1',
param2: 'value2'
}
}Installing
$ npm install connection-stringLoading
- Node.js
var parse = require('connection-string');- Browser
<script src="./connection-string"></script>
<script>
// function parseConnectionString is available here
</script>Usage
See Wiki Examples.