1.0.17 • Published 4 years ago

happyphone v1.0.17

Weekly downloads
34
License
Creative Commons ...
Repository
github
Last release
4 years ago

happyphone

Make your phone number nice and easy to remember

specification

  • Choose the language in which to translate the phone number.
  • Divide the number into groups of 3 (Including the international prefix, without +).
  • For each group of numbers a word is chosen from the dictionary.
  • The character '+' is ignored.
  • If the group of numbers starts with zero then you ignore it.

examples

+ABCDEFGH is divided into groups of numbers for the dictionary (in the available dictionaries):

ABC = dictionary line

DEF = dictionary line

GH = dictionary line

installation

npm install happyphone

run example (examples directory)

npm start

lint code

npm run tslint

usage

// Typescript
import { HappyPhone } from "happyphone";
var t = new HappyPhone.Converter();
t.happyphone("328274", "ITALIAN", (TAI) => {
    console.log(TAI);
});
// ['cedrata', 'buio']

t.happyphone(['cedrata', 'buio'], "ITALIAN", (TAI) => {
    console.log(TAI);
});
// ['328', '274']
// Javascript
var _hp = require("happyphone")
var t = new _hp.HappyPhone.Converter();

t.happyphone("328274", "ITALIAN", (TAI) => {
    console.log(TAI);
});
// ['cedrata', 'buio']

t.happyphone(['cedrata', 'buio'], "ITALIAN", (TAI) => {
    console.log(TAI);
});
// ['328', '274']
1.0.17

4 years ago

1.0.16

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago