2.1.0 • Published 5 years ago

whatvanity v2.1.0

Weekly downloads
4
License
Unlicense
Repository
github
Last release
5 years ago

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.

letterreplaced to number
a,b,c,A,B,C2
d,e,f,D,E,F3
g,h,i,G,H,I4
j,k,l,J,K,L5
m,n,o,M,N,O6
p,q,r,s,P,Q,R,S7
t,u,v,T,U,V8
w,x,y,z,W,X,Y,Z9

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.