Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Convert strings of text to/from NATO phonetic alphabet and morse code.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 index.js
Octocat-spinner-32 package.json
README.md

NPA (v0.1.1)

Install: npm install npa

This project is Unlicensed. In other words, I don't care what you do with it. However, if you make something interesting, I would like to check it out.

Information:

Well, the wiki article probably says enough. Find it here.

NOTE: This was just for fun. Inspired by "Foxtrot Uniform Charlie Kilo" - Bloodhound Gang.

Usage:

var NPA = require('npa')();

NPA.toNPA(string) - Convert a string to NPA.

NPA.fromNPA(string) - Convert a string from NPA.

NPA.toMorse(string) - Convert a string to morse code.

NPA.fromMorse(string) - Convert a string from morse code.


Node.js:
   var NPA = require('npa')(),
       string = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla interdum.';
   var morse = NPA.toMorse(string);
   console.log('(toMorse) '+string+':\n '+morse+'\n\n');
   console.log('(fromMorse) '+morse+':\n '+NPA.fromMorse(morse)+'\n\n');
   var npa = NPA.toNPA(string);
   console.log('(toNPA) '+string+':\n '+npa+'\n\n');
   console.log('(fromNPA) '+npa+':\n '+NPA.fromNPA(npa)+'\n\n');

Browser:
   <script src="./npa.js"></script>
   <script>
      var string = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla interdum.',
          morse = NPA.toMorse(string);
      alert('(toMorse) '+string+':\n '+morse+'\n\n');
      alert('(fromMorse) '+morse+':\n '+NPA.fromMorse(morse)+'\n\n');
      var npa = NPA.toNPA(string);
      alert('(toNPA) '+string+':\n '+npa+'\n\n');
      alert('(fromNPA) '+npa+':\n '+NPA.fromNPA(npa)+'\n\n');
   </script>
Something went wrong with that request. Please try again.