Giter Site home page Giter Site logo

Comments (9)

catamphetamine avatar catamphetamine commented on August 17, 2024

How do you expect a national number 233111111111 in international to be +233111111111.
That's nonsense

from libphonenumber-js.

mikhail-angelov avatar mikhail-angelov commented on August 17, 2024

233 - is country code, so I expect International phone format in, this case should be like
+233111111111 (the same as google-libphonenumber)
not
+233 233111111111 (current behavior)

from libphonenumber-js.

catamphetamine avatar catamphetamine commented on August 17, 2024

Show me "same as google-libphonenumber" in the google-libphonenumber demo

from libphonenumber-js.

mikhail-angelov avatar mikhail-angelov commented on August 17, 2024

https://libphonenumber.appspot.com/phonenumberparser?number=233111111111&country=GH

from libphonenumber-js.

catamphetamine avatar catamphetamine commented on August 17, 2024

And?
What's the international number on that page.

from libphonenumber-js.

mikhail-angelov avatar mikhail-angelov commented on August 17, 2024

ok, incorrect input, sorry
check out this link
https://libphonenumber.appspot.com/phonenumberparser?number=233244111111&country=GH

from libphonenumber-js.

mikhail-angelov avatar mikhail-angelov commented on August 17, 2024

import { format } from 'libphonenumber-js'

it('Ghana phone',()=>{
const phone = format('233244111111', 'GH', 'International')
expect(phone).toBe('+233244111111')
})
///-
Expected value to be (using ===):
"+233244111111"
Received:
"+233 233244111111"

from libphonenumber-js.

catamphetamine avatar catamphetamine commented on August 17, 2024

ok, while libphonenumber parses 233244111111 as +233244111111 I don't see any reason for doing that because if the international standard states that there must be a + sign then there must be a + sign and I don't think it would be sane to try adding a + sign manually just to check if an invalid phone number can be parsed as an international one.

from libphonenumber-js.

mikhail-angelov avatar mikhail-angelov commented on August 17, 2024

ok, no problem.

from libphonenumber-js.

Related Issues (20)

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.