Git Product home page Git Product logo

elm-countries's People

Contributors

dependabot-preview[bot] avatar garrow avatar jdemler avatar supermario avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

elm-countries's Issues

Bug in searchCustom

From reading the source code of searchCustom, I noticed what I think is a bug: by checking if the query is a substring of country.name ++ country.code, you'd get Andorra (and a few other countries) as a result for query "aa" even though no "aa" appears in either the country name or code individually. For query "aa" I would expect "Sint Maarten (Dutch part)" to be the only result.

Provide Static Access to a Country

Hi there ๐Ÿ‘‹๐Ÿป Thanks for providing this library. It's useful.

I wanted to ask if you can provide static access to the countries.

I want to interact with the YouTube API, and for that, I need a country code. I can guess the user's country code through their IP address, but if that fails, I would like to provide a default country, but currently, there's no static access to it. I can search for the country code with the API provided, but Elm's type checker doesn't know if that country exists, so I would have to handle the possibility of Nothing even though we know that that country is in the list.

I'm currently solving this by constructing the Country myself, but I'm afraid that this approach will cause that the Country I made will become out of sync with the list in your package.

I understand that this change will require a tedious process of changing the tuple into Country and updating the documentation to reflect the newly exported values, so I am more than glad to take up this task. Just let me know, and I'll get on it.

Thanks for your attention.

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.