Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

multiserver-address

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

multiserver-address

define valid [multiserver](https://github.com/ssbc/multiserver) addresses

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
231
increased by63.83%
Maintainers
1
Weekly downloads
 
Created
Source

multiserver-address

define valid multiserver addresses

format is:

name = [a-z][a-z0-9\-]+           //name may contain lower case, digits, and -. must start with lower case.
escaped = ![!:;~]                 //special characters !:;~ may be escaped with !
data = [!-9]|[<-}]|escaped        //data field may contain any non-space character, but special characters must be escaped.
protocol = name(:data)*           //a protocol is a name and zero or more data elements
address = protocol(~protocol)*    //an address is 1 or more protocols
multiaddress = address(;address)* //a multiaddress is 1 or more addresses!

api

follows the pattern of level codec

decode (string) => data

parse a multiserver address

encode (data) => string

reverse of decode

check (string) => boolean

returns true if string is a valid multiserver address. if check returns false, decode will throw if called with the same input.

License

MIT

FAQs

Package last updated on 12 Oct 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc