whatvanity

2.1.0 • Public • Published

Build Status codecov

whatvanity

A very simple program to convert a vanity phone number to numeric value.

It strips off any non alpha-numeric characters, and replaces the alphabets to numbers as below.

letter replaced to number
a,b,c,A,B,C 2
d,e,f,D,E,F 3
g,h,i,G,H,I 4
j,k,l,J,K,L 5
m,n,o,M,N,O 6
p,q,r,s,P,Q,R,S 7
t,u,v,T,U,V 8
w,x,y,z,W,X,Y,Z 9

Installation

  npm install whatvanity --save

Tests

  npm test

Usage

  var vanityToNum = require('whatvanity');
  var vanityPhNum = '1800TESTING';
  var numericPhNum = vanityToNum(vanityPhNum);

Release History

  • 2.1.0 Added code coverage via codecov.io
  • 2.0.0 Updated logic, added ci via Travis-CI.org
  • 1.0.0 Initial Release

License

This code has been released under the UNLICENSE.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.1.0
    8
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.1.0
    8
  • 2.0.0
    0

Package Sidebar

Install

npm i whatvanity

Weekly Downloads

8

Version

2.1.0

License

Unlicense

Unpacked Size

5.9 kB

Total Files

7

Last publish

Collaborators

  • npmbaron