Giter Site home page Giter Site logo

Comments (3)

manishobhatia avatar manishobhatia commented on July 17, 2024

Hi @mayurmadnani

Thanks for reporting this issue. The library can be made agnostic of country and this is a good issue to fix that.

But not matter if we add or remove, we will have to do it for all country codes possible .

Here are some pointers to think about:

  • This needs to be done in pre-processing step, so any solution we can think of, should ideally be a pre-processing function
  • If we can think of having a generic solution without maintaining a repository of all country codes, that will be good.
  • We could possibly also write the pre-processing function, that takes the country code as a param from the user. That way the library need not store it
  • Also think of different variations a phone number can be entered, here are some variations in prefix

12323332222 (prefix of 1)
+12323332222 (prefix of +1)
0012323332222 (prefix of 001)
2323332222 (no prefix)

  • Also think of formatting on all the above combinations

hope this helps.

from fuzzy-matcher.

AdityaSoni19031997 avatar AdityaSoni19031997 commented on July 17, 2024

If we can think of having a generic solution without maintaining a repository of all country codes, that will be good.

I doubt one can do this without having the info on country-codes pre-cached. We can accept it from the user but user also probably will google it up etc. + Prefixes won't be consistent either, it's not limited to the 4 variations shared above, it can be lot more than that and all cannot be covered. And thus one cannot do string slice of fixed length etc to fetch split the number into country code and contact info.

from fuzzy-matcher.

manishobhatia avatar manishobhatia commented on July 17, 2024

going to close this for now, will reopen as new request for this change comes in

from fuzzy-matcher.

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.