https://github.com/cilindrox/redis-url-parser
  
  
    Parse Redis URL strings 
    https://github.com/cilindrox/redis-url-parser
  
        Last synced: 2 months ago 
        JSON representation
    
Parse Redis URL strings
- Host: GitHub
- URL: https://github.com/cilindrox/redis-url-parser
- Owner: cilindrox
- Created: 2015-07-28T13:06:12.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-12-23T14:01:44.000Z (almost 10 years ago)
- Last Synced: 2025-08-03T10:53:47.664Z (3 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- 
            Metadata Files:
            - Readme: Readme.md
 
Awesome Lists containing this project
README
          
# redis-url-parser
  A Redis URL parser
[](https://travis-ci.org/cilindrox/redis-url-parser) [](https://codeclimate.com/github/cilindrox/redis-url-parser) [](https://codeclimate.com/github/cilindrox/redis-url-parser/coverage)
## Installation
```bash
npm install --save redis-url-parser
```
## Example
```js
// parses URL for connection options
var redisParser = require('redis-url-parser');
var url = 'redis://user:password@example.com:9876/db';
var options = redisParser.parse(url);
/* options is now
{ 
  host: 'example.com',
  port: 9876,
  password: 'password'
}
*/
```
## License 
(The MIT License)
Copyright (c) 2015 Gaston Festari <cilindrox@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.