{"id":16092390,"url":"https://github.com/bukinoshita/catch-pokemon","last_synced_at":"2025-04-05T18:47:52.554Z","repository":{"id":66114837,"uuid":"95610510","full_name":"bukinoshita/catch-pokemon","owner":"bukinoshita","description":"Algorithm to catch a pokemon","archived":false,"fork":false,"pushed_at":"2019-06-04T04:49:56.000Z","size":56,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-12T08:51:20.985Z","etag":null,"topics":["algorithm","catch","javascript","nodejs","pokeball","pokemon"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bukinoshita.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-27T23:53:57.000Z","updated_at":"2021-09-15T18:06:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"16aef50a-4a0b-42b3-a9f1-8d6fd8775975","html_url":"https://github.com/bukinoshita/catch-pokemon","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"1109757c2f9c7c4ca524467346ec8adeac9dcc95"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bukinoshita%2Fcatch-pokemon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bukinoshita%2Fcatch-pokemon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bukinoshita%2Fcatch-pokemon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bukinoshita%2Fcatch-pokemon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bukinoshita","download_url":"https://codeload.github.com/bukinoshita/catch-pokemon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247385703,"owners_count":20930600,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithm","catch","javascript","nodejs","pokeball","pokemon"],"created_at":"2024-10-09T16:07:50.210Z","updated_at":"2025-04-05T18:47:52.536Z","avatar_url":"https://github.com/bukinoshita.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# catch-pokemon [![Build Status](https://travis-ci.org/bukinoshita/catch-pokemon.svg?branch=master)](https://travis-ci.org/bukinoshita/catch-pokemon)\n\n\u003e Algorithm to catch a pokemon\n\n\n## Install\n\n```\n$ npm install --save catch-pokemon\n```\n\n\n## Usage\n```js\nconst catchPokemon = require('catch-pokemon')\n\ncatchPokemon('Pikachu', 'masterball')\n// =\u003e All right! Pikachu was caught!\n```\n\n\n## API\n\n### catchPokemon(pokemon, pokeball, [options])\n\nreturns a `promise`\n\n#### pokemon\n\nType: `string`\u003cbr/\u003e\nRequired\n\nPokemon's name\n\n#### pokeball\n\nType: `string`\u003cbr/\u003e\nOptions: `pokeball`, `masterball`, `greatball`, `ultraball` and `safariball`\u003cbr/\u003e\nRequired\n\nPokeball's name\n\n#### options\n\nType: `object`\n\n##### hp\n\nType: `integer`\n\nPokemon's hp\n\n##### catchRate\n\nType: `integer`\n\nPokemon's catch rate\n\n##### asleep\n\nType: `boolean`\u003cbr/\u003e\nDefault: false\n\nDetermine if pokemon is asleep\n\n##### frozen\n\nType: `boolean`\u003cbr/\u003e\nDefault: false\n\nDetermine if pokemon is frozen\n\n##### paralyzed\n\nType: `boolean`\u003cbr/\u003e\nDefault: false\n\nDetermine if pokemon is paralyzed\n\n##### burned\n\nType: `boolean`\u003cbr/\u003e\nDefault: false\n\nDetermine if pokemon is burned\n\n##### poisoned\n\nType: `boolean`\u003cbr/\u003e\nDefault: false\n\nDetermine if pokemon is poisoned\n\n\nIf `hp` and `catchRate` are passed it won't look up for these information on API (faster). Otherwise, it will try to find the Pokemon on the API.\n\n\n## Related\n\n- [pokemon-game](https://github.com/bukinoshita/pokemon-game) — Pokemon game — Get 'em all\n- [pokedex-api](https://github.com/bukinoshita/pokedex-api) — Pokedex API\n- [pokemon-catch-probability](https://github.com/bukinoshita/pokemon-catch-probability) — Check probabilty to catch a pokemon\n- [get-pokeball](https://github.com/bukinoshita/get-pokeball) — Get pokeball information\n- [pokeball-shake](https://github.com/bukinoshita/pokeball-shake) — Algorithm to determine how many times pokeball shakes\n- [pokemon-capture-quote](https://github.com/bukinoshita/pokemon-capture-quote) — Pokemon capture quote\n- [pokemon-f](https://github.com/bukinoshita/pokemon-f) — Algorithm to calculate `f` on capture pokemon method\n\n\n## License\n\nMIT © [Bu Kinoshita](https://bukinoshita.io)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbukinoshita%2Fcatch-pokemon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbukinoshita%2Fcatch-pokemon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbukinoshita%2Fcatch-pokemon/lists"}