How to use the ip-address.v4.Address function in ip-address

To help you get started, we’ve selected a few ip-address examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github PaddeK / node-maxmind-db / lib / IPAddress.js View on Github external
exports.parseIPv4 = function parseIPv4(ip) {
    var v4Address = new IPv4.Address(ip);
    if (!v4Address.isValid()) {
        throw new Error("Invalid IPv4 address");
    return v4Address.parsedAddress;


A library for parsing IPv4 and IPv6 IP addresses in node and the browser.

Latest version published 7 months ago

Package Health Score

84 / 100
Full package analysis