Skip to content
LJ

libphonenumber-js

+221 numbers in JavaScript

Official site consultedLocalisation and languages

Last verified: 1 October 2026

JavaScript and TypeScript rewrite of Google's libphonenumber to parse, format and validate international phone numbers, lighter (about 145 kB versus 550 kB). It also offers as-you-type formatting and line type detection; Senegal is not mentioned.

Services
  • Parsing and formatting (national, international, E.164, RFC3966)
  • As-you-type formatting
  • Validation and number type detection
  • TypeScript definitions included
Access requirements

Dual MIT and Apache 2.0 license; install with npm install libphonenumber-js.

Sources