Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gabemart/hipku
Encode any IP address as a haiku
https://github.com/gabemart/hipku
Last synced: 2 months ago
JSON representation
Encode any IP address as a haiku
- Host: GitHub
- URL: https://github.com/gabemart/hipku
- Owner: gabemart
- License: mit
- Created: 2014-12-12T00:29:08.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2019-01-31T18:24:52.000Z (almost 6 years ago)
- Last Synced: 2024-11-04T18:12:12.188Z (2 months ago)
- Language: JavaScript
- Size: 23.4 KB
- Stars: 308
- Watchers: 9
- Forks: 25
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-hilarious-repos - Hipku - JavaScript library to encode IPv6 and IPv4 addresses as [haiku](https://en.wikipedia.org/wiki/Haiku) (Libraries, Frameworks and SDKs)
- awesome-programming-humor - hipku - Encode any IP address as a haiku. (GitHub Projects)
README
# Hipku
A tiny javascript library to encode IPv6 and IPv4 addresses as haiku.
For full documentation and a working demo, check out https://gabrielbrady.com/projects/hipku
## Installation
Install with `npm install hipku`. `index.js` can also be used directly in the browser.
## Usage
To encode `127.0.0.1` or `::1` call `Hipku.encode('127.0.0.1')` or `Hipku.encode('::1')`. IPv4 addresses must have octets separated by a `.` period character and IPv6 addresses must have hextets separated by a `:` colon character.
When decoding a hipku, such as:
The weary red dove
fights in the empty tundra.
Jasmine petals dance.the lines can be separated either by the newline character `\n` or by a space. Both will produce the same result.
Hipku.decode('The weary red dove\nfights in the empty tundra.\nJasmine petals dance.');
> "254.53.93.114"
Hipku.decode('The weary red dove fights in the empty tundra. Jasmine petals dance.');
> "254.53.93.114"
### Node.js
var hipku = require('hipku');
hipku.encode('127.0.0.1');
hipku.decode('The weary red dove fights in the empty tundra. Jasmine petals dance.');