Giter Site home page Giter Site logo

pokemon's People

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pokemon's Issues

Spanish missing

It's necessary the Spanish language because some pokémon have a different name as Type: Null that is called "Código Cero" in Spanish

Cheers!

Use getLocalizedList?

If getLocalizedList was exported, you could for instance list out every pokemon. It would be a better solution than require("pokemon/data/en.json") (not even sure if that works)

I would open a pull request, but I wanted to see if this was a good idea first.

Get pokemon by pokedex number, or return pokedex number from pokemon name

Fun package!

Suggestion for an enhancement:

Do you think it would be beneficial to have explicit named functions for the above functionality? It would be something simple like (but maybe with better names):

function getByNumber(pokedexNumber = 0) {
  return pokemon[pokedexNumber - 1];
}

function getNumber(name = '') {
  const pokedexNumber = pokemon.indexOf(name);

  return pokedexNumber === -1 ? pokedexNumber : pokedexNumber + 1;
}


exports.getByNumber = getByNumber;
exports.getNumber = getNumber;

Cannot find module "./data/en"

Just installed this via yarn/npm in my Vue JS project, but it couldn't compile due to the pokemon package not being able to import /data/en.json.

I fixed it by just changing index.js line 3:
const pokemon = require('./data/en.json');

Can't use this package in create-react-app

It uses some of ES2015 features, like template strings or arrow functions.

When trying to build a create-react-app it fails with the following error:

Creating an optimized production build...
Failed to compile.

Failed to minify the code from this file: 

 	./node_modules/pokemon/index.js:6 

Read more here: http://bit.ly/2tRViJ9

It would be nice to publish an ES5 version to npm.

https://github.com/bookercodes/articles/blob/master/how-to-build-and-publish-es6-npm-modules-today-with-babel.md

[Suggestion] change function getName

why we have a function called getName but we need to pass the id?

Screenshot from 2022-08-06 20-03-50

For me getName we need to pass the name of pokemon we want.

Example of the function finding by name

exports.getName = (pokemonName, language = 'en') => {
	 const list = getLocalizedList(language);
	const name = list.find(pokemon => pokemon === pokemonName);

	if (!name) {
		throw new Error(`Pokémon with name '${pokemonName}' does not exist. ${reportText}`);
	}

	return name;
};

Regional Variants

Hi team,

It seems that the long list of Pokemon in /data does not contain any regional forms i.e. Alolan forms and Galarian forms. For example, there should be both Ninetales and Alolan-Ninetales, but it seems that only the former exists in the list. The same applies for all the regional variants.

Could these be added?

Update with new Pokémon

The following new Pokémon need to be added:

803 Poipole
804 Nagandel
805 Stakataka
806 Blacephalon
807 Zeraora
808 Meltan
809 Melmetal

Move json files to directory

I think it might be cleaner if we moved the json files in a subdirectory.

pokemon
   |- en.json
   |- fr.json
   |- ...

French Name could be wrong

Hello,

I do not really know what is the reference for french name.
Mr. Mime (122) in "french pokemon go" is : M. Mime and not Mime.
for pokemon "Type: Null" (772) will it be Type: 0 or Type: Zero ?

Add name to error if pokemon does not exist

I created a list of ids of rare pokemon based on their names. I had some typos and the package only throws an error indicating that a pokemon with that name does not exist. It would be nice if it showed Pokemom with name ${name} does not exist instead.

Meta: generation 8 missing

Last october the 8th generation of Pokemon in the form of Pokémon Sword and Pokémon Shield released on the Nintendo Switch. I notice that you're missing all of their names.

I can make a PR for this when I got some more time if you'd like.

getName \ getId improvements

Offer a little improvements for the function getName. Second argument is optional, and return object with name on all langs.

And something similar to getId function. Looking for a name of all dictionaries, if the second argument is not specified.

What do you think about it?

Support for Pokemon with multiple forms

Would it be possible to add support for Pokemon with multiple forms?

For example, have something like Vulpix-alola or Ponyta-galar? And maybe even support for Pokemon that can change their types with held items, i.e. Arceus and Silvally?

I'd be happy to make the additions if this is approved.

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.