{"id":15313871,"url":"https://github.com/itsdouges/gw2-resource-utils","last_synced_at":"2025-03-02T13:24:16.704Z","repository":{"id":57259797,"uuid":"94213892","full_name":"itsdouges/gw2-resource-utils","owner":"itsdouges","description":"Creates maps of gw2 resources with associated helper utilities.","archived":false,"fork":false,"pushed_at":"2017-06-14T00:08:58.000Z","size":372,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-20T08:18:17.801Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/itsdouges.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-13T13:06:07.000Z","updated_at":"2017-06-14T00:08:36.000Z","dependencies_parsed_at":"2022-08-25T01:01:53.398Z","dependency_job_id":null,"html_url":"https://github.com/itsdouges/gw2-resource-utils","commit_stats":null,"previous_names":["madou/gw2-resource-utils"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsdouges%2Fgw2-resource-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsdouges%2Fgw2-resource-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsdouges%2Fgw2-resource-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsdouges%2Fgw2-resource-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itsdouges","download_url":"https://codeload.github.com/itsdouges/gw2-resource-utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241511217,"owners_count":19974375,"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":[],"created_at":"2024-10-01T08:43:29.286Z","updated_at":"2025-03-02T13:24:16.681Z","avatar_url":"https://github.com/itsdouges.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [gw2-resource-utils](https://github.com/madou/gw2-resource-utils)\n\n[![NPM version](http://img.shields.io/npm/v/gw2-resource-utils.svg?style=flat-square)](https://www.npmjs.com/package/gw2-resource-utils)\n[![NPM downloads](http://img.shields.io/npm/dm/gw2-resource-utils.svg?style=flat-square)](https://www.npmjs.com/package/gw2-resource-utils)\n[![Build Status](http://img.shields.io/travis/madou/gw2-resource-utils/master.svg?style=flat-square)](https://travis-ci.org/madou/gw2-resource-utils)\n[![codecov](https://codecov.io/gh/madou/gw2-resource-utils/branch/master/graph/badge.svg)](https://codecov.io/gh/madou/gw2-resource-utils)\n[![Dependency Status](http://img.shields.io/david/madou/gw2-resource-utils.svg?style=flat-square)](https://david-dm.org/madou/gw2-resource-utils)\n\nCreates maps of gw2 resources with associated helper utilities.\n\n## Installation\n\n```sh\nnpm install gw2-resource-utils\n```\n\n## Api\n\n### `build (resourceName: string) =\u003e Promise\u003cResourceMap\u003e`\n\n```javascript\nimport { build } from 'gw2-resource-utils';\n\nconst nameToIdMap = await build('items');\n// { \"MONSTER ONLY Moa Unarmed Pet\":1 ... }\n```\n\n#### `ResourceMap`\n\n```json\n{\n \"Item Name\": 10\n}\n```\n\n### `exact (map: ResourceMap, itemName: string) =\u003e ?number`\n\n```javascript\nimport { exact } from 'gw2-resource-utils';\n\nconst itemId = exact(nameToIdMap, 'MONSTER ONLY Moa Unarmed Pet');\n// 1\n```\n\n### `fuzzy (map: ResourceMap, itemName: string) =\u003e ?number`\n\n```javascript\nimport { fuzzy } from 'gw2-resource-utils';\n\nconst items = fuzzy(nameToIdMap, 'monster');\n// { \"Legendary Kudu's Monster Loot Box\": 65497, ... }\n```\n\n### Testing\n\n```bash\nnpm test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsdouges%2Fgw2-resource-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitsdouges%2Fgw2-resource-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsdouges%2Fgw2-resource-utils/lists"}