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

ip-net

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

ip-net

Practical methods for analyzing IP and subnet.

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
5
Maintainers
1
Weekly downloads
 
Created
Source

ip-tools

some useful functions to IP(IPv4 and IPv6)

Usage

// IP Object
const ip = ipv4('192.168.0.1')
ip.address // 192.168.0.1
ip.isValid() // true
ip.inReversedRange() // number
ip.getOctet(2)
ip.getOctets()
ip.containBy(network)

// Subnet Object
const subnet = subnetv4('192.168.1.1/24')
subnet.networkAddress // 192.168.1.0
subnet.broadcastAddress // 192.168.1.255
subnet.firstHost // 192.168.1.1
subnet.lastHost // 192.168.1.254
subnet.mask // 255.255.255.0
subnet.cidrMask // 24

Keywords

ip

FAQs

Package last updated on 24 Jan 2024

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