pretty164
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

pretty164: Simple E.164 dash-inserter

Reformats E.164 strings by inserting dashes. No dependancies.

Usage

// node (after `npm install pretty164@1.1.1`):
const { pretty164 } = require("pretty164"); // .cjs
import { pretty164 } from "pretty164"; // or .mjs or package.json type:"module"

// deno:
import { pretty164 } from "https://deno.land/x/pretty164@1.1.1/pretty164.ts";

// web esm:
import { pretty164 } from "https://www.unpkg.com/pretty164@1.1.1/esm/pretty164.js";

pretty164("+14155552671");
//=> "+1-415-555-2671"

pretty164("+442071838750");
//=> "+44-20-7183-8750"

pretty164("nope");
//=> "nope"

References

Readme

Keywords

Package Sidebar

Install

npm i pretty164

Weekly Downloads

16

Version

1.1.1

License

MIT

Unpacked Size

4.73 kB

Total Files

9

Last publish

Collaborators

  • rentzsch