A small utility (v1.0.6) that extracts and formats Turkish telephone numbers from arbitrary input strings. It strips non-digit characters, detects the leading digit prefix, and outputs in standard Turkish format (e.g., 0 (212) 123 45 68). No dependencies, no configuration. Suitable for Node.js and browser (via bundler). Primarily useful for cleaning user input or displaying raw phone data in a readable Turkish format.
npm install turkey-tel-number-formatterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to import and use the formatter to clean a messy string into a Turkish phone number.
Ensure the input string has at least 10 digits (including leading 0 or country code).
Only use for Turkish numbers starting with 0 (or +90 then 0/5).
Manually replace leading '0' with '+90' if needed.
Add declaration: declare module 'turkey-tel-number-formatter';
Use default import: import ttnf from 'turkey-tel-number-formatter' or const ttnf = require('turkey-tel-number-formatter')Run 'npm install turkey-tel-number-formatter' and ensure the module path is correct.
No dependency data recorded yet.