Skip to content

ip-addressvshttptools

MIT 32 1 522
50.6 million (month) May 05 2015 9.0.5(9 months ago)
1,173 2 9 MIT
Dec 28 2012 18.0 million (month) 0.6.1(8 months ago)

The "ip-address" library is a Node.js library that provides utility functions for working with IP addresses, similar to "ip" library. It provides functions for parsing, validating, and converting IP addresses between different formats, both IPv4 and IPv6.

httptools is a package for parsing and modifying HTTP protocol strings which supports HTTP1.1 and HTTP2 protocol versions.

httptools is a Python binding for the nodejs HTTP parser. The package is available on PyPI: pip install httptools

Example Use


const IPAddress = require("ip-address").Address;

// slice and manipulate addresses:
const ipv4 = new IPAddress("192.168.1.1");
console.log(ipv4.addressMinusSuffix); // '192.168.1'

// validate addresses:
console.log(IPAddress.isValid("192.168.1.1")); // true
console.log(IPAddress.isValid("2001:0db8:85a3:0000:0000:8a2e:0370:7334")); // true

Alternatives / Similar


Was this page helpful?