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

addr-to-ip-port

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

addr-to-ip-port

Convert an 'address:port' string to an array [address:string, port:number]

  • 1.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.6K
decreased by-29.53%
Maintainers
1
Weekly downloads
 
Created
Source

addr-to-ip-port travis npm downloads gittip

Convert an "address:port" string to an array [address:string, port:number]

browser support

Uses a cache to prevent excessive array allocations and GC.

Works in node and the browser. This module is used by WebTorrent!

install

npm install addr-to-ip-port

usage

var addrToIPPort = require('addr-to-ip-port')

addrToIPPort('1.2.3.4:8000') //=> ['1.2.3.4', 8000]
addrToIPPort('1.2.3.4:8000') //=> ['1.2.3.4', 8000] (returns the cached object)

license

MIT. Copyright (c) Feross Aboukhadijeh.

Keywords

FAQs

Package last updated on 26 Nov 2014

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