SSB Address
standard address-string parser for secure scuttlebutt
var addr = // => { protocol: 'http:', host: 'localhost', port: 2000, domain: 'http://localhost:2000' }// => { protocol: 'http:', host: 'localhost', port: 8080, domain: 'http://localhost:8080' }// => { protocol: 'https:', host: 'localhost', port: 2000, domain: 'https://localhost:2000' }// => { protocol: 'https:', host: 'localhost', port: 8080, domain: 'https://localhost:8080' }// => { protocol: 'http:', host: 'localhost', port: 2000, domain: 'http://localhost:2000' }
MIT license