GithubHelp home page GithubHelp logo

ladjs / country-language Goto Github PK

View Code? Open in Web Editor NEW
13.0 13.0 5.0 165 KB

Query any country's spoken languages or countries where a language is spoken.

License: MIT License

JavaScript 99.41% Shell 0.59%

country-language's People

Contributors

alatzidis avatar joebowbeer avatar niftylettuce avatar pauliusuza avatar tassosd avatar teyou avatar titanism avatar

Stargazers

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

Watchers

 avatar  avatar

country-language's Issues

[fix] Dash confusion in data.json

Describe the bug

vscode displays numerous warnings regarding the presence of en dashes in place of hyphens

The character U+2013 "–" could be confused with the character U+002d "-", which is more common in source code

Code to reproduce

https://github.dev/ladjs/country-language/blob/master/data.json

Checklist

  • I have searched through GitHub issues for similar issues.
  • I have completely read through the README and documentation.
  • I have tested my code with the latest version of Node.js and this package and confirmed it is still not working.

[fix] langs is not iterable

Describe the bug

Node.js version: v18.12.1

OS version: OSX Venture 13.1

Description:
TypeError exception triggered on some countries without languages array within countries object in data.json

Actual behavior

Exception triggered

      for (const l of langs) {
                      ^

TypeError: langs is not iterable

Expected behavior

should just return [] // empty array

Code to reproduce

CountryLanguage.getCountryLanguages("PS")

Checklist

  • I have searched through GitHub issues for similar issues.
  • I have completely read through the README and documentation.
  • I have tested my code with the latest version of Node.js and this package and confirmed it is still not working.

Add support for typescript

Describe the feature

I cannot fined types for this package. I want to use it in a typescript website. Any idea where i can find the types?

This is the error i get:

   djs/country-language'. 'D:/deploy/node_modules/@ladjs/country-language/index.js' implicitly has an 'any' type.
   Try `npm i --save-dev @types/ladjs__country-language` if it exists or add a new declaration (.d.ts) file containing `declare module 
  '@ladjs/country-language';`

Checklist

✅ I have searched through GitHub issues for similar issues.
✅ I have completely read through the README and documentation.

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.