3.0.0 • Published 5 years ago

ip-ptr v3.0.0

Weekly downloads
3,259
License
BSD-2-Clause
Repository
github
Last release
5 years ago

ip-ptr

npm.io npm.io npm.io

Get the PTR name for a given IPv4 or IPv6 address

Installation

$ npm i ip-ptr

Example

const ipPtr = require('ip-ptr');

ipPtr('1.2.3.4');
//=> 4.3.2.1.in-addr.arpa
ipPtr('2001:db8::1');
//=> 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa

API

ipPtr(ip)

  • ip string - A IPv4 or IPv6 address.

Will throw on if ip is not a valid IP address.

© silverwind, distributed under BSD licence

3.0.0

5 years ago

2.0.0

6 years ago

1.2.1

6 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago