ipwords

1.0.5 • Public • Published

ipwords

Simple library that transforms IPv4 addresses into easy to remember word strings.

Installation

npm i ipwords

Command-line Usage

To encode an IP address to a string: ipwords -e "192.0.0.1"

To decode an IP address from a string: ipwords -d "not that that tennis"

Library Usage

The library consists of two functions:

decodeIP(wordcombo):

  • Accepts a string, returns an IP
  • Will throw an Error if wordcombo is not exactly 4 space-delimited words

encodeIP(ip):

  • Accepts an IP, returns a string
  • Will throw an Error if ip is not a valid IPv4 address

Readme

Keywords

Package Sidebar

Install

npm i ipwords

Weekly Downloads

6

Version

1.0.5

License

MIT

Unpacked Size

7.37 kB

Total Files

5

Last publish

Collaborators

  • bobbyraduloff