2.1.1 • Published 9 months ago

martian-cidr v2.1.1

Weekly downloads
262
License
MIT
Repository
github
Last release
9 months ago

Martian CIDR

Check if an IP address is from reserved subnet.

Build Status

Certain IP subnets are reserved for special-use by Internet Assigned Numbers Authority (IANA). A Martian packet is an IP packet which specifies a source or destination address from such subnet. If seen on the public internet, these packets cannot actually originate as claimed, or be delivered.

You can check if some packet is a Martian packet like that:

import isMartianIP from 'martian-cidr'
console.log(isMartianIP('10.0.0.1')) // true

ES modules only

Version 2.0.0 introduces a breaking change: the support for CommonJS is removed, minimal Node.js version becomes 14.

Install

npm install --save martian-cidr

Running tests

npm run test

Author

Tom Adler

License

MIT

2.1.1

9 months ago

2.1.0

9 months ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

8 years ago

1.0.3

9 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago