Skip to content


MIT 103 2 6,252
89 (month) Jun 18 2013 0.1.3(1 year, 9 months ago)
1,436 1 79 MIT
2.0.1(a month ago) Aug 15 2012 107.7 million (month)

URI.js is a lightweight JavaScript library for working with URLs and URIs in Node.js and the browser. It provides a simple and consistent interface for parsing, manipulating, and building URLs and URIs.

The "ip" library is a Node.js library that provides utility functions for working with IP addresses. It provides functions for parsing, validating, and converting IP addresses between different formats.

The "ip" library provides a simple and easy-to-use interface for working with IP addresses in Node.js. It can be useful in a variety of contexts, such as when creating a network-related application or when working with IP addresses in a web application.

Example Use

const URI = require('uri-js');

// parse url for values
const parsedUrl = URI.parse("");
/* Output:
    scheme: 'https',
    authority: '',
    path: '/search',
    query: 'q=query+string',
    fragment: 'fragment'

// create url from values
const urlComponents = {
    scheme: 'https',
    authority: '',
    path: '/search',
    query: 'q=query+string',
    fragment: 'fragment'
const url = URI.serialize(urlComponents);
// Output: ''
const ip = require('ip');

// check IP validity:
console.log(ip.isV4Format('')); // true
console.log(ip.isV4Format('2001:0db8:85a3:0000:0000:8a2e:0370:7334')); // false

// check subnets
console.log(ip.cidrSubnet('')); // { networkAddress: '', broadcastAddress: '' }
console.log(ip.not('')); // ''

Alternatives / Similar