10.0.1 • Published 7 months ago

ip-address v10.0.1

Weekly downloads
282,593
License
MIT
Repository
github
Last release
7 months ago

CircleCI codecov downloads npm snyk

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

var Address6 = require('ip-address').Address6;

var address = new Address6('2001:0:ce49:7601:e866:efff:62c3:fffe');

var teredo = address.inspectTeredo();

teredo.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

socks@stackmate/engineprolinkwiretestexpress-crowdsec-bouncerttt-minion3dsecureio-mappings@infinitebrahmanuniverse/nolb-ip-assisted-ui-libminearc-guardian@everything-registry/sub-chunk-1928geoip-lite-updpostgresql-type-parserstalos-commonstemptiflywhois-rdapwafrisweristteapackage-tatespoorman297super-search-hubsuper-server-logssuperadmin-cliswizvlsm-toolsvaldivantiq-react@dmxjs/prolink-connect@codebet/geoip-lite-auto-update@crowdsec/express-bouncer@bunchtogether/braid-server@rsw31106/xengine@postgresql-typed/parsersip-cidrip-cidr-webpackip-cityip-location-apiip-indexip-range-localaddress-agentipfs-swarmjs-simplek8s-apijsreport-clijesh-calculationjnf-accesscontrol-rnttljpeix1ng-utilip-traceip-setipfix_nodetime-line-prolinktest_lib_module_aarquickcapture_react_nativeic3zyapisub-store-convertspeed-testjssshexstaging_loopsubwaymantehmusimhujanudger-nodejsuccps-assisted-ui-libttt-minion2ttalostj-aiuilibtj-temptiflyul-ipuniversityliving-newipunleash-serverunleash-client@apexfusionfoundation/vector-sdk-core@authentication/cloudflare-ip@avanio/ip-block@aviinash_jha/react-native-test_multiply@aguycalled/socks5-client@algoraven/util-backend@algolia/dns-filter@badaimweeb/js-protov2d@balena/proxy-protocol-parser@balena/proxy-protocol-v2@breakaway/ui-lib@buckaroo/buckaroo_sdk@cardano-sdk/core@cdxoo/check-ip-in-range4proxy6@adatechnology/react-native-android-getnet-pos@abhinavoneuipoc/stencil-test@dgac/asterix-toolyarn-react-hook-formyountxs-js-libp2p-tcpxs-js-multiaddrzxinc-ipv6waffle-server-import-cli@hankfc/stencil-starter@helpdotcom/is@heroku/socksv5@finviet-jsrpt/jsrpt-cli@frc-web-components/node-wpilib-ws@eventi/interfaces@gibme/mikrotik
10.0.0

8 months ago

10.0.1

7 months ago

9.1.0-0

8 months ago

9.0.5

2 years ago

9.0.4

2 years ago

9.0.3

2 years ago

9.0.2

2 years ago

9.0.1

2 years ago

9.0.0

2 years ago

8.1.0

4 years ago

8.0.0

4 years ago

7.1.0

5 years ago

7.0.1

5 years ago

7.0.0

5 years ago

7.0.0-beta.1

5 years ago

7.0.0-beta.0

5 years ago

6.4.0

5 years ago

6.3.0

5 years ago

6.2.0

5 years ago

6.1.0

6 years ago

6.0.0

6 years ago

5.9.4

6 years ago

5.9.3

6 years ago

5.9.2

6 years ago

5.9.1

6 years ago

5.9.0

6 years ago

5.8.9

7 years ago

5.8.8

8 years ago

5.8.7

8 years ago

5.8.6

8 years ago

5.8.5

8 years ago

5.8.4

8 years ago

5.8.3

8 years ago

5.8.2

9 years ago

5.8.0

9 years ago

5.7.0

9 years ago

5.6.0

9 years ago

5.5.0

9 years ago

5.4.1

9 years ago

5.4.0

9 years ago

5.3.0

9 years ago

5.2.0

9 years ago

5.1.1

9 years ago

5.1.0

9 years ago

5.0.2

10 years ago

5.0.1

10 years ago

4.2.0

10 years ago

4.1.0

10 years ago

4.0.0

10 years ago

3.2.0

10 years ago

3.2.1

10 years ago