{"id":21107247,"url":"https://github.com/glaivepro/wa-calculator","last_synced_at":"2025-07-08T16:31:36.199Z","repository":{"id":65581564,"uuid":"594417859","full_name":"GlaivePro/wa-calculator","owner":"GlaivePro","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-21T22:26:04.000Z","size":49,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-30T22:02:58.407Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GlaivePro.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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":"2023-01-28T13:50:22.000Z","updated_at":"2023-10-21T22:50:45.000Z","dependencies_parsed_at":"2024-11-20T03:47:02.251Z","dependency_job_id":null,"html_url":"https://github.com/GlaivePro/wa-calculator","commit_stats":{"total_commits":53,"total_committers":3,"mean_commits":"17.666666666666668","dds":"0.037735849056603765","last_synced_commit":"97f27208bf4ad95cd6a23f6ed0d3af058b3511d3"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GlaivePro/wa-calculator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlaivePro%2Fwa-calculator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlaivePro%2Fwa-calculator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlaivePro%2Fwa-calculator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlaivePro%2Fwa-calculator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GlaivePro","download_url":"https://codeload.github.com/GlaivePro/wa-calculator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlaivePro%2Fwa-calculator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264304586,"owners_count":23587990,"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":["hacktoberfest"],"created_at":"2024-11-20T00:37:19.991Z","updated_at":"2025-07-08T16:31:35.943Z","avatar_url":"https://github.com/GlaivePro.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WA Calculator\n\nPoint calculators for track \u0026 field events\n\nFor PHP version of this library see [GlaivePro/IaafPoints](https://github.com/GlaivePro/IaafPoints).\n\n## Installation\n\nNo CDN support at the moment, you have to import and bundle it yourself.\n\n```sh\nnpm i @glaivepro/wa-calculator\n```\n\n## Usage\n\n```js\nimport { WaCalculator } from '@glaivepro/wa-calculator'\n\nconst options = [\n\tedition: '2017', // edition of scoring tables, default is '2017' \n\tgender: 'm', // 'm' or 'f', default is 'm'\n\tvenueType: 'outdoor', // 'indoor' or 'outdoor', default is 'outdoor'\n\telectronicMeasurement: true, // whether electronic or hand time was taken, default is true\n\tdiscipline: '200m', // no default, see below how to list available keys\n];\n\nconst calculator = new WaCalculator(options)\n\n// Evaluate a result getting some points or a class assigned to result.\nconst points = calculator.evaluate(21.61) // 980\n\n// Update options\ncalculator.setOptions({ gender : 'f' })\nconst femalePoints = $calculator-\u003eevaluate(21.61) // 1279\n\n// Get list of editions\ncalculator.getEditions()\n\n// Get list of discipline keys available for current edition, venueType and gender\ncalculator.getDisciplines()\n```\n\nSome options for advanced usage:\n\n```js\n// Get calculation coefficients for current setup\ncalculator.getCoefficients()\n\n// Calculate from result using given coefficients\nconst resultShift = -110\nconst conversionFactor = 0.335\nconst pointShift = 0\ncalculator.evaluateUsing(result, { resultShift, conversionFactor, pointShift })\n```\n\n## TODO/wishlist\n\n- [x] WA (Hungarian) points calculator\n- [x] WA (Hungarian) points 2022\n- [ ] Combined points calculator\n- [ ] Dist for browser support\n- [ ] TS support\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglaivepro%2Fwa-calculator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglaivepro%2Fwa-calculator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglaivepro%2Fwa-calculator/lists"}