Giter VIP home page Giter VIP logo

phoneformat's Introduction

PhoneFormat

This is a copy of albeebe/phoneformat.js with the following changes:

  • This is a Bower package
  • Website is not a part of the repository
  • Updating is as simple as typing make (assuming curl is installed)
  • Exposed getNumberType(country, phone) to return the type of the phone number (mobile, landline, toll free, etc.)

Install

bower install phoneformat

Use

Reference phoneformat.min.js from your project.

Available functions:

  • countryForE164Number(phone)
  • formatNumberForMobileDialing(country, phone)
  • isValidNumber(phone, country)
  • formatE164(country, phone)
  • formatInternational(country, phone)
  • formatLocal(country, phone)
  • cleanPhone(phone)
  • countryCodeToName(country)

All of the above are subject to change in future versions.

Todo

  • AMD
  • Better API

phoneformat's People

Contributors

elad avatar jeff-french avatar wcomartin avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

phoneformat's Issues

No longer formatting

I agree with you about using make to update. So I'm using your bower package :).

However, the update broke formatting.

phoneformat.min.js:376 Uncaught TypeError: goog.proto2.Message.set$Metadata is not a function

Updating Readme file

Hi,

This is a great thing that you added bower support to the phoneformat.js file. It will be really helpful if you can update the Readme with proper bower commands to use to include that package in one's project and the description.

Thanks for implementing this :)

Version number mismatch.

You have your version number written as 0.0.8 on Tag name. But, it is 0.0.7 on package json and bower. Is that expected?

Needs package.json for npm support

I agree with your rationale on #4 and also think it would be useful to publish under the same name to npm. I can submit a PR for this, but I thought you may want to init your own package.json because it contains author info and so on.

Export issue

require("phoneformat") returns an empty javascript object. Is this made to work in a NodeJS application ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.