This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
Format phone number by country
version 2.0.2
license MIT
native-modules False
elm-version 0.18.0 <= v < 0.19.0
Tag 2.0.2
Committed At 2017-01-12 04:25:08 UTC
elm-lang/html 2.0.0 <= v < 3.0.0 2.0.0
elm-lang/core 5.0.0 <= v < 6.0.0 5.1.1

Modules

README

Phone

A library for converting plain number to desired country's phone format. Supports ISO2 codes for 232 countries/

Usage

Say we want to format this number 2345678912 to the US format +1 (234) 567-8912,

import Phone

output = Phone.format "us" 2345678912

--> output == "+1 (234) 567-8912"

To get list of all countries

import Phone

countries = Phone.getAllCountries

--> countries = [(Name, ISO2, IntDialCode, Maybe Format), ...]

Credits

This library is inspired by https://github.com/razagill/react-phone-input

License

Copyright © 2016 Thomas Loh Distributed under MIT license.