Telefonnummer is a Swedish phone number formatter and parser (v2.1.0, stable). It formats both mobile and landline numbers to a standardized format with area code support. Includes functions for parsing, validation (with optional mobile-only check), area code lookup, normalization, and equality comparison. Ships TypeScript types. Updated infrequently, last release 2023-09-01. Key differentiator: focused solely on Swedish numbers with official area code data from PTS.
npm install telefonnummerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates parsing Swedish numbers, internationalization option, validation, area code lookup, and numbering area lookup.
Use named import { parse } instead of default import.Check the returned string for unexpected literal values when parsing short numbers.
Use libphonenumber-js or google-libphonenumber for international numbers.
Use import { parse } from 'telefonnummer'.Run 'npm install telefonnummer' and ensure correct import path.
Use import { validator } from 'telefonnummer'.No dependency data recorded yet.