💻 a library for parsing and manipulating IPv4 and IPv6 addresses in JavaScript
Installations
npm install ip-address
Score
99.5
Supply Chain
99.6
Quality
83.2
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Developer
Developer Guide
Module System
CommonJS
Min. Node Version
>= 12
Typescript Support
Yes
Node Version
18.20.4
NPM Version
10.8.3
Statistics
582 Stars
450 Commits
73 Forks
16 Watching
14 Branches
18 Contributors
Updated on 27 Nov 2024
Bundle Size
20.08 kB
Minified
5.60 kB
Minified + Gzipped
Languages
TypeScript (96.74%)
JavaScript (3.18%)
Shell (0.08%)
Total Downloads
Cumulative downloads
Total Downloads
567,082,678
Last day
-6.1%
2,787,778
Compared to previous day
Last week
2.5%
16,147,004
Compared to previous week
Last month
8.1%
67,532,010
Compared to previous month
Last year
2,248%
495,695,011
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
22
ip-address
ip-address
is a library for validating and manipulating IPv4 and IPv6
addresses in JavaScript.
Upgrading from 9.x to 10.x
The dependency on jsbn
was removed thanks to
michal-kocarek. Thanks Michal! For
clarity, all methods with BigInteger in the name were renamed to BigInt.
Breaking changes
#fromBigInteger()
→#fromBigInt()
; now returns a native BigInt#bigInteger()
→#bigInt()
; now returns a native BigInt
Documentation
Documentation is available at ip-address.js.org.
Examples
1var Address6 = require('ip-address').Address6; 2 3var address = new Address6('2001:0:ce49:7601:e866:efff:62c3:fffe'); 4 5var teredo = address.inspectTeredo(); 6 7teredo.client4; // '157.60.0.1'
Features
- Usable via CommonJS or ESM
- Parsing of all IPv6 notations
- Parsing of IPv6 addresses and ports from URLs with
Address6.fromURL(url)
- Validity checking
- Decoding of the Teredo information in an address
- Whether one address is a valid subnet of another
- What special properties a given address has (multicast prefix, unique local address prefix, etc.)
- Number of subnets of a certain size in a given address
- Display methods
- Hex, binary, and decimal
- Canonical form
- Correct form
- IPv4-compatible (i.e.
::ffff:192.168.0.1
)
- Works in node and the browser (with browserify)
- ~1,600 test cases
Used by
- anon which powers @congressedits, among many others
- base85: base85 encoding/decoding
- contrail-web-core: part of Contrail, a network virtualization solution made by Juniper Networks
- dhcpjs: a DHCP client and server
- epochtalk: next generation forum software
- geoip-web: a server for quickly geolocating IP addresses
- hexabus: an IPv6-based home automation bus
- hubot-deploy: GitHub Flow via hubot
- heroku-portscanner: nmap hosted on Heroku
- ipfs-swarm: a swarm implementation based on IPFS
- javascript-x-server: an X server written in JavaScript
- libnmap: a node API for nmap
- mail-io: a lightweight SMTP server
- maxmind-db-reader: a library for reading MaxMind database files
- proxy-protocol-v2: a proxy protocol encoder/decoder built by Ably
- Samsara: a Docker web interface
- sis-api: a configuration management database API
- socks5-client: a SOCKS v5 client
- socksified: a SOCKS v5 client
- socksv5: a SOCKS v5 server/client
- ssdapi: an API created by the University of Portsmouth
- SwitchyOmega: a Chrome extension for switching between multiple proxies with ~311k users!
- swiz: a serialization framework built and used by Rackspace
No vulnerabilities found.
Reason
12 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 10
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
3 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-7q7g-4xm8-89cq
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-g3ch-rx76-35fx
Reason
Found 3/28 approved changesets -- score normalized to 1
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 5 are checked with a SAST tool
Score
4.7
/10
Last Scanned on 2024-11-25
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