New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ipport

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ipport

convert ip:port object/string/buffer

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
3
-25%
Maintainers
1
Weekly downloads
 
Created
Source

ipport

convert ip:port object/string/buffer

GitHub NPM Author

accepted structures

object: {address:'address', port:port}:

  • {address:'127.0.0.1', port:3000}
  • {address:'8.8.8.8', port:53}

string: address:port:

  • 127.0.0.1:3000
  • 8.8.8.8:53

buffer: new Buffer([net[0], net[1], net[2], net[3], port(Int16BE)]):

  • <Buffer 7f 00 00 01 0b b8>
  • <Buffer 08 08 08 08 00 35>

methods

  • toObject(IPPort) - returns given IPPort as an object
  • toString(IPPort) - returns given IPPort as an string
  • toBuffer(IPPort) - returns given IPPort as an buffer

install

npm install ipport

licence

MIT

Keywords

ip

FAQs

Package last updated on 30 Dec 2012

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