A lightweight Node.js library for parsing and formatting phone numbers. Current stable version is 0.0.4 (last updated 2013). It provides two simple methods: normalize() to strip formatting from phone numbers, and format() to output phone numbers in a custom format using "N" placeholders. It can handle many US-centric formats but has limited international support. The library is minimal and has no external dependencies.
npm install node-phone-formatterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates how to normalize a phone number and then format it with a custom pattern.
Use a maintained alternative like libphonenumber-js or google-libphonenumber.
Use require() or wrap in a dynamic import.
Format with country code separately if needed.
Always ensure input is normalized or omit the option.
Use a library with full international support.
Use: const phoneFormatter = require('phone-formatter');Check input: phoneFormatter.normalize(input || '');
No dependency data recorded yet.