
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@jnode/ipSimple IP handling package for Node.js.
npm i @jnode/ip
const { IP, IPRange, IPRangeGroup } = require('@jnode/ip');
const ipv4 = new IP('127.0.0.1');
console.log(ipv4.toString()); // '::ffff:127.0.0.1'
const ipv6 = new IP('2001:db8::1');
console.log(ipv6.toString()); // '2001:db8::1'
const range = new IPRange('192.168.1.0/24');
// returns true
console.log(range.check('192.168.1.5'));
// using the IP instance method
const myIp = new IP('10.0.0.1');
console.log(myIp.within('10.0.0.0/8')); // true
The package provides a high-performance way to handle IP addresses by converting them into BigInt representations.
::ffff:0:0/96 prefix) to allow seamless comparison and range checking across different protocols.This approach makes subnet calculations and IP comparisons extremely fast and reliable.
ip.IPRepresents an IP address.
new ip.IP(address)address <string> | <bigint> | <ip.IP>
'127.0.0.1') or IPv6 (e.g., '::1').IP instance, it clones the value.ip.toString()Returns the string representation of the IP address. IPv4 addresses are returned in IPv4-mapped IPv6 format (e.g., ::ffff:1.2.3.4). IPv6 addresses are returned with zero compression where applicable.
ip.within(range)range <ip.IPRange> | <string>Checks if the IP address is within the specified CIDR range.
ip.IPRangeRepresents a CIDR range used for filtering or matching IP addresses.
new ip.IPRange(cidr)cidr <string> An IP address followed by a prefix length (e.g., '192.168.0.0/16' or '2001:db8::/32').ipRange.check(ip)Returns true if the provided IP address is within the CIDR range.
ip.IPRangeGroupA utility class to check an IP against multiple CIDR ranges simultaneously.
new ip.IPRangeGroup(ranges)ranges <Array> An array of CIDR strings or ip.IPRange instances.ipRangeGroup.check(ip)Returns true if the provided IP address matches any of the ranges in the group.
FAQs
Simple IP handling package for Node.js.
We found that @jnode/ip demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.