{"id":18942311,"url":"https://github.com/itsjavi/koffingjs","last_synced_at":"2025-04-15T21:31:30.459Z","repository":{"id":66165505,"uuid":"106973842","full_name":"itsjavi/koffingjs","owner":"itsjavi","description":"Online Pokémon Showdown Team parser that converts your competitive strategies to machine-readable JSON code.","archived":false,"fork":false,"pushed_at":"2023-08-09T16:47:48.000Z","size":1905,"stargazers_count":23,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-04T04:36:39.871Z","etag":null,"topics":["pokemon","pokemon-showdown","pokemonshowdown","pokemonsimulator","pokepaste","showdown","smogon","smogon-api"],"latest_commit_sha":null,"homepage":"https://itsjavi.com/koffing/","language":"TypeScript","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/itsjavi.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}},"created_at":"2017-10-15T01:01:40.000Z","updated_at":"2024-11-02T19:02:49.000Z","dependencies_parsed_at":"2023-11-22T03:26:33.726Z","dependency_job_id":"a22fdcb5-4440-49f6-9aec-9552e4456694","html_url":"https://github.com/itsjavi/koffingjs","commit_stats":null,"previous_names":["supeffective/koffing","itsjavi/koffing"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsjavi%2Fkoffingjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsjavi%2Fkoffingjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsjavi%2Fkoffingjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsjavi%2Fkoffingjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itsjavi","download_url":"https://codeload.github.com/itsjavi/koffingjs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223685507,"owners_count":17185864,"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":["pokemon","pokemon-showdown","pokemonshowdown","pokemonsimulator","pokepaste","showdown","smogon","smogon-api"],"created_at":"2024-11-08T12:32:21.421Z","updated_at":"2024-11-08T12:32:22.096Z","avatar_url":"https://github.com/itsjavi.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Koffing\n\n[![npm version](https://badge.fury.io/js/koffing.svg)](https://badge.fury.io/js/koffing)\n![Build Status](https://github.com/itsjavi/koffing/actions/workflows/CI.yml/badge.svg?branch=develop)\n\nKoffing is a Pokemon Showdown importable-syntax parser for JavaScript and TypeScript.\n\n[Pokémon Showdown](https://www.pokemonshowdown.com/) is the most popular online Pokémon battle simulator,\none of the best ways to quickly try your strategies for the official Pokémon VGC Championships. This library is just\na parser for the teams generated by the [Showdown Team Builder](https://play.pokemonshowdown.com/teambuilder) exports.\n\nThis repository holds the source code for the library as well as the code for the Online Parser.\nThe [Online Parser](https://itsjavi.github.io/koffing) does not require you to download\nany library or script, it is recommended if all you want is to sanitize, prettify or convert to JSON your\nShowdown team exports.\n\n## Features\n\n- Compatible with Gen 9 Pokémon definitions\n- Compatible with web browsers, ES6+, TypeScript and NodeJS\n- Converts from Showdown code to JSON and vice-versa\n- Sanitizes Showdown code (removing invalid data, applying max and mins values, etc.)\n- Prettifies Showdown code (proper indentation, line breaks and sorting of the data, etc.)\n- [Online Parser](https://itsjavi.github.io/koffing), which is using the library\n  featuring all the above mentioned.\n\n## Installation\n\nAs a package:\n\n```bash\nnpm i koffing\n\n# or\n\npnpm add koffing\n```\n\n## Usage\n\n### Javascript (ES5, web)\n\n```html\n\u003cscript src=\"https://unpkg.com/koffing@latest/dist/index.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  var teamCode = `=== [gen7] Folder 1/Example Team ===`\n  var parsedTeam = Koffing.parse(teamCode)\n  console.log(parsedTeam)\n\n  // Note that the ShowdownParser class, which is used internally by the Koffing class\n  // is also exposed in the global scope:\n  console.log(new ShowdownParser(teamCode).parse())\n\u003c/script\u003e\n```\n\n### Javascript/TypeScript (ES Modules)\n\n```js\n'use strict'\n\nimport { Koffing } from 'https://unpkg.com/koffing@latest/dist/index.mjs'\n// or\nimport { Koffing } from 'koffing'\n\nconst teamCode = `\n=== [gen7] Folder 1/Example Team ===\n\nSmogon (Koffing) (F) @ Eviolite\nLevel: 5\nAbility: Levitate\nShiny: Yes\nHappiness: 255\nEVs: 36 HP / 236 Def / 236 SpD\nIVs: 31 HP / 30 Atk / 31 SpA / 30 SpD / 31 Spe\nBold Nature\n- Will-O-Wisp\n- Pain Split\n- Sludge Bomb\n- Fire Blast`\n\nconst parsedTeam = Koffing.parse(teamCode)\n\n// This will log a PokemonTeamSet object:\nconsole.log(parsedTeam)\n\n// Convert it back to the Showdown format (prettified). These 3 lines are equivalent:\nconsole.log(parsedTeam.toShowdown())\nconsole.log(parsedTeam.toString())\nconsole.log(parsedTeam + '')\n```\n\n### NodeJS\n\n```js\nconst Koffing = require('koffing').Koffing\n\nconst teamCode = `=== [gen7] Folder 1/Example Team ===`\nconst parsedTeam = Koffing.parse(teamCode)\n```\n\n## License\n\nThis software is copyrighted and licensed under the\n[MIT license](https://github.com/itsjavi/koffing/LICENSE).\n\n### Disclaimer\n\nThis software comes bundled with data and graphics extracted from the\nPokémon series of video games. Some terminology from the Pokémon franchise is\nalso necessarily used within the software itself. This is all the intellectual\nproperty of Nintendo, Creatures, inc., and GAME FREAK, inc. and is protected by\nvarious copyrights and trademarks.\n\nThe authors believe that the use of this intellectual property for a fan reference\nis covered by fair use and that the software is significantly impaired without said\nproperty included. Any use of this copyrighted property is at your own legal risk.\n\nThis software is not affiliated in any way with Nintendo,\nPokémon or any other game company.\n\nA complete revision history of this software is available from\nhttps://github.com/itsjavi/koffing\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsjavi%2Fkoffingjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitsjavi%2Fkoffingjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsjavi%2Fkoffingjs/lists"}