• Stars
    star
    141
  • Rank 259,971 (Top 6 %)
  • Language
    JavaScript
  • License
    Other
  • Created about 12 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

phonenumber.js is a JavaScript library to verify and format phone numbers

PhoneNumber.js

PhoneNumber.js is a JavaScript library to verify and format phone numbers. It is similar in purpose to Google's libphonenumber library, with the main difference that Google's code is some incredibly ugly spaghetti code that was cross-compiled from Java and uses around 10MB of memory.

The memory use of PhoneNumber.js starts around 60k and increases as region meta data is unpacked. Depending on the memory layout of the specific JavaScript engine, peak memory use should be below 200k. If you mostly format numbers from one or a few regions, memory use should be pretty close to 60k.

PhoneNumber.js uses libphonenumber's PhoneNumberMetadata.xml database of known phone number formats. Use "make" to download the xml file and translate it into PhoneNumber.js's internal format.

Copyright and license

PhoneNumber.js was written by Andreas Gal [email protected] as part of Mozilla's Firefox OS (Boot to Gecko) project and is licensed under the Apache License, Version 2.0.

More Repositories

1

B2G

Boot to Gecko aims to create a complete, standalone operating system for the open web.
Shell
907
star
2

dom.js

Self-hosted JavaScript implementation of a WebIDL-compliant HTML5 DOM.
JavaScript
473
star
3

zipfile.js

Unzip files from .zip archives in JavaScript
JavaScript
63
star
4

node-wav

High performance WAV file decoder and encoder for node
Java
58
star
5

darkhttpd

darkhttpd for B2G
C
37
star
6

predict.js

Predictive text in JavaScript
JavaScript
29
star
7

swf.js

A flash bytecode VM in JavaScript
JavaScript
24
star
8

canvas.webgl

2D Canvas implementation in WebGL
JavaScript
19
star
9

afsk.js

1200 baud AFSK soft modem with forward error correction
JavaScript
7
star
10

ime.js

JavaScript
7
star
11

wifi.js

B2G wifi stack
JavaScript
7
star
12

GT9100-kernel

Samsung Galaxy S 2 Linux Kernel
C
6
star
13

usbserial

Prolific PL2303 USB to serial adapter driver for node
JavaScript
6
star
14

wbmp.js

A JavaScript library to decode WBMP images used in MMS
JavaScript
5
star
15

node-kissfft

kissfft bindings for node
C
4
star
16

finalize.js

Garbage collector callbacks for JavaScript/node
Java
3
star
17

smartptr.js

Smart pointers for JavaScript/node
Java
3
star
18

adi

Firefox ADI data analysis
JavaScript
3
star
19

agps.js

Assisted GPS in JavaScript
JavaScript
3
star
20

path.js

JavaScript path rendering library
JavaScript
3
star
21

node-gonk

Android/gonk builds (and build script) for node.js
C
2
star
22

dashboard

Bugzilla Dashboard for Firefox OS
JavaScript
2
star
23

dump-tombstone

JavaScript
2
star
24

sync2

An extension to sync profile data into a local couchdb.
JavaScript
2
star
25

mongoose

mongoose for b2g
C
1
star
26

covidgraphs

Generate graphs based on covidtracking.com data
JavaScript
1
star
27

mozilla-inbound

1
star
28

xnpm

Cross-compile npm modules for ANDROID
Shell
1
star