pretty164
v1.1.1
Published
Simple E.164 dash-inserter
Downloads
5
Readme
pretty164: Simple E.164 dash-inserter
Reformats E.164 strings by inserting dashes. No dependancies.
Usage
// node (after `npm install [email protected]`):
const { pretty164 } = require("pretty164"); // .cjs
import { pretty164 } from "pretty164"; // or .mjs or package.json type:"module"
// deno:
import { pretty164 } from "https://deno.land/x/[email protected]/pretty164.ts";
// web esm:
import { pretty164 } from "https://www.unpkg.com/[email protected]/esm/pretty164.js";
pretty164("+14155552671");
//=> "+1-415-555-2671"
pretty164("+442071838750");
//=> "+44-20-7183-8750"
pretty164("nope");
//=> "nope"