Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 23, 2024 via pnpm

netmask 2.0.2

Parse and lookup IP network blocks
Package summary
Share
0
issues
1
license
1
MIT
Package created
5 Apr 2012
Version published
2 Apr 2021
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
netmask@2.0.2
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of netmask 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does netmask do?

Netmask is a powerful npm package designed to parse and understand IPv4 CIDR blocks. This allows developers to explore and compare various network blocks. The operation of this module greatly resembles the functionality of the Perl Net::Netmask module. It provides functionalities like identifying the base address of the network block, the netmask, host mask, size of IP addresses in the block among others.

How do you use netmask?

Usage of the Netmask npm package is quite straightforward and requires simple JavaScript code. Begin by installing the package using npm install netmask. To utilize it, require the package in your script and create a new instance of the Netmask class. In this instance, the CIDR block to be parsed will be passed as an argument. Various methods such as base, mask, size, contains, forEach, next, among others can then be invoked on the created block instance.

Here's an example of how to use Netmask:

var Netmask = require('netmask').Netmask

var block = new Netmask('10.0.0.0/12');
console.log(block.base); // Outputs: 10.0.0.0
console.log(block.contains('10.0.8.10'));  // Outputs: true
console.log(block.next());  // Outputs: Netmask('10.16.0.0/12')

Where are the netmask docs?

The documentation for the Netmask npm package can be found directly in the readme section of the package's page on GitHub. It is also likely that detailed usage examples and API information can be found by looking into the repository's code. To get there, visit the repository's URL at git://github.com/rs/node-netmask.git.