
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
@types/cidr-matcher
Advanced tools
TypeScript definitions for cidr-matcher
npm install --save @types/cidr-matcher
This package contains type definitions for cidr-matcher (https://github.com/pracucci/node-cidr-matcher).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cidr-matcher.
declare class Matcher {
/**
* Constructs a matcher for a list of CIDR ranges
*
* @param cidrRanges - list of IPv4 & IPv6 CIDR ranges
*/
constructor(cidrRanges?: readonly string[]);
/**
* Does the CIDR ranges include the IP address
*
* @param ipAddress - ip address to check
* @returns whether the IP address is in the range
*/
contains(ipAddress: string): boolean;
/**
* Does the CIDR ranges includes any of the IP addresses
*
* @param ipAddresses - ip addresses to check
* @returns whether any of the IP addresses are in the range
*/
containsAny(ipAddresses: string[]): boolean;
/**
* Adds a CIDR range to the matcher
*
* @param cidr - CIDR range to add
*/
addNetworkClass(cidr: string): void;
}
export = Matcher;
These definitions were written by Sam Murphy.
FAQs
TypeScript definitions for cidr-matcher
The npm package @types/cidr-matcher receives a total of 16,556 weekly downloads. As such, @types/cidr-matcher popularity was classified as popular.
We found that @types/cidr-matcher demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.