Security News
The Dark Side of Open Source
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
parse-redis-url-simple
Advanced tools
Readme
Simple parser for redis url. It supports sentinel urls for ioredis
const parseRedisUrl = require('parse-redis-url-simple')
// Defaults to localhost:6379/0
parseRedisUrl()
//=> [{host: 'localhost', port: 6379, database: '0', password: undefined}]
parseRedisUrl('redis://')
//=> [{host: 'localhost', port: 6379, database: '0', password: undefined}]
// But you can change databases by adding a path
parseRedisUrl('redis:///1')
//=> [{host: 'localhost', port: 6379, database: '1', password: undefined}]
// Many instances
parseRedisUrl('redis://barhost.com:39143/,redis://foohost.com:39143/')
//=> [{host: 'barhost.com', port: 39143, database: '0', password: undefined},
//=> {host: 'foohost.com', port: 39143, database: '0', password: undefined}]
// And even add passwords
parseRedisUrl('redis://n9y25ah7@foohost.com:39143/')
parseRedisUrl('redis://:n9y25ah7@foohost.com:39143/')
//=> [{host: 'foohost.com', port: 39143, database: '0', password: 'n9y25ah7'}]
// If you add a username, it's ignored
parseRedisUrl('redis://user:hunter2@foohost.com:39143/')
//=> [{host: 'foohost.com', port: 39143, database: '0', password: 'hunter2'}]
// For sentinels: just set parameter sentinel=true
parseRedisUrl('barhost.com:39143,foohost.com:39143,foobarhost.com:39143', sentinel=true)
//=> [{host: 'barhost.com', port: 39143},{host: 'foohost.com', port: 39143},{host: 'foobarhost.com', port: 39143}]
Could be found here:
All implementations
are not maintained or not for production use. It looks they were implemented only for testing purposes. Usually there have been more than one redis server in production. Moreover sometimes it is implemented via cluster or sentinel.
FAQs
Simple parser for redis url
The npm package parse-redis-url-simple receives a total of 29,957 weekly downloads. As such, parse-redis-url-simple popularity was classified as popular.
We found that parse-redis-url-simple demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.