Gathering detailed insights and metrics for ip
Gathering detailed insights and metrics for ip
Gathering detailed insights and metrics for ip
Gathering detailed insights and metrics for ip
internal-ip
Get your internal IP address
ip-regex
Regular expression for matching IP addresses (IPv4 & IPv6)
@leichtgewicht/ip-codec
Small package to encode or decode IP addresses from buffers to strings.
ip-address
A library for parsing IPv4 and IPv6 IP addresses in node and the browser.
npm install ip
Typescript
Module System
Node Version
NPM Version
99.8
Supply Chain
97
Quality
81.6
Maintenance
84
Vulnerability
100
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
1,541 Stars
88 Commits
219 Forks
38 Watchers
3 Branches
19 Contributors
Updated on Jul 09, 2025
Latest Version
2.0.1
Package Id
ip@2.0.1
Unpacked Size
15.13 kB
Size
5.09 kB
File Count
3
NPM Version
10.2.4
Node Version
20.11.0
Published on
Feb 19, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
IP address utilities for node.js
1npm install ip
1git clone https://github.com/indutny/node-ip.git
Get your ip address, compare ip addresses, validate ip addresses, etc.
1var ip = require('ip'); 2 3ip.address() // my ip address 4ip.isEqual('::1', '::0:1'); // true 5ip.toBuffer('127.0.0.1') // Buffer([127, 0, 0, 1]) 6ip.toString(new Buffer([127, 0, 0, 1])) // 127.0.0.1 7ip.fromPrefixLen(24) // 255.255.255.0 8ip.mask('192.168.1.134', '255.255.255.0') // 192.168.1.0 9ip.cidr('192.168.1.134/26') // 192.168.1.128 10ip.not('255.255.255.0') // 0.0.0.255 11ip.or('192.168.1.134', '0.0.0.255') // 192.168.1.255 12ip.isPrivate('127.0.0.1') // true 13ip.isV4Format('127.0.0.1'); // true 14ip.isV6Format('::ffff:127.0.0.1'); // true 15 16// operate on buffers in-place 17var buf = new Buffer(128); 18var offset = 64; 19ip.toBuffer('127.0.0.1', buf, offset); // [127, 0, 0, 1] at offset 64 20ip.toString(buf, offset, 4); // '127.0.0.1' 21 22// subnet information 23ip.subnet('192.168.1.134', '255.255.255.192') 24// { networkAddress: '192.168.1.128', 25// firstAddress: '192.168.1.129', 26// lastAddress: '192.168.1.190', 27// broadcastAddress: '192.168.1.191', 28// subnetMask: '255.255.255.192', 29// subnetMaskLength: 26, 30// numHosts: 62, 31// length: 64, 32// contains: function(addr){...} } 33ip.cidrSubnet('192.168.1.134/26') 34// Same as previous. 35 36// range checking 37ip.cidrSubnet('192.168.1.134/26').contains('192.168.1.190') // true 38 39 40// ipv4 long conversion 41ip.toLong('127.0.0.1'); // 2130706433 42ip.fromLong(2130706433); // '127.0.0.1'
This software is licensed under the MIT License.
Copyright Fedor Indutny, 2012.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8.1/10
Summary
ip SSRF improper categorization in isPublic
Affected Versions
<= 2.0.1
0/10
Summary
NPM IP package incorrectly identifies some private IP addresses as public
Affected Versions
< 1.1.9
Patched Versions
1.1.9
0/10
Summary
NPM IP package incorrectly identifies some private IP addresses as public
Affected Versions
= 2.0.0
Patched Versions
2.0.1
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
7 existing vulnerabilities detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
Found 2/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More