{"id":24727049,"url":"https://github.com/riennevaplus/gtin-manager","last_synced_at":"2025-03-22T14:41:11.824Z","repository":{"id":46218566,"uuid":"298150334","full_name":"RienNeVaPlus/gtin-manager","owner":"RienNeVaPlus","description":"🏷️ Generates a list of EANs / GTINs for a given Global Company Prefix (GPC / Basisnummer)","archived":false,"fork":false,"pushed_at":"2021-11-06T03:30:40.000Z","size":1310,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-13T08:08:57.111Z","etag":null,"topics":["ean","ean-code","ean-list","ean13","generator","gtin","gtin-codes","gtin-generator","gtin-list","gtin-toolkit","node-js"],"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/RienNeVaPlus.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}},"created_at":"2020-09-24T02:39:33.000Z","updated_at":"2024-09-11T18:26:53.000Z","dependencies_parsed_at":"2022-08-25T02:30:17.404Z","dependency_job_id":null,"html_url":"https://github.com/RienNeVaPlus/gtin-manager","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RienNeVaPlus%2Fgtin-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RienNeVaPlus%2Fgtin-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RienNeVaPlus%2Fgtin-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RienNeVaPlus%2Fgtin-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RienNeVaPlus","download_url":"https://codeload.github.com/RienNeVaPlus/gtin-manager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244973701,"owners_count":20541021,"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":["ean","ean-code","ean-list","ean13","generator","gtin","gtin-codes","gtin-generator","gtin-list","gtin-toolkit","node-js"],"created_at":"2025-01-27T14:43:11.326Z","updated_at":"2025-03-22T14:41:11.801Z","avatar_url":"https://github.com/RienNeVaPlus.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch3 align=\"center\"\u003e║█║▌║█║▌│║▌║▌█║\u003c/h3\u003e\n\n\u003ch1 align=\"center\"\u003e🏷️ GTIN Manager\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  Generates \u003cb\u003eG\u003c/b\u003elobal \u003cb\u003eT\u003c/b\u003erade \u003cb\u003eI\u003c/b\u003etem \u003cb\u003eN\u003c/b\u003eumbers (formerly known as \u003cb\u003eEAN\u003c/b\u003es) for a given \u003cb\u003eG\u003c/b\u003elobal \u003cb\u003eC\u003c/b\u003eompany \u003cb\u003eP\u003c/b\u003erefix.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/RienNeVaPlus/gtin-manager/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/gtin-manager.svg\" alt=\"license\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/RienNeVaPlus/gtin-manager/commits/master\"\u003e\u003cimg src=\"https://img.shields.io/github/last-commit/riennevaplus/gtin-manager.svg\" alt=\"last-commit\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/RienNeVaPlus/gtin-manager/blob/master/package.json\"\u003e\u003cimg src=\"https://img.shields.io/github/package-json/v/riennevaplus/gtin-manager.svg\" alt=\"version\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/RienNeVaPlus/gtin-manager\"\u003e\u003cimg src=\"https://img.shields.io/github/repo-size/riennevaplus/gtin-manager.svg\" alt=\"version\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\n\u003ch6 align=\"center\"\u003e║▌║█║║▌▌│║▌║║▌▌║\u003c/h6\u003e\n\n### Setup\n\n```ts\nnpm install gtin-manager\n// or\nyarn add gtin-manager\n```\n\n\u003ch6 align=\"center\"\u003e║▌║█║║▌▌║▌║█║▌║\u003c/h6\u003e\n\n### Usage\nCreate a generator instance using a GCP ([Global Company Prefix](https://www.gs1ie.org/standards/identification/global-company-prefix-gcp/)) provided by [GS1](https://www.gs1-germany.de/).\n\n```ts\nimport Manager from 'gtin-manager'\n\nconst manager = new Manager('12345678')\n```\n\n\u003ca id='manager-contingent'\u003e\u003c/a\u003e\n`manager.contingent`\n---\n\nReturns the amount of possible GTINs that can be created from the current GCP.\n\n```ts\nmanager.contingent === 10000 // true\n```\n\n\u003ca id='manager-index'\u003e\u003c/a\u003e\n`manager.index(number)`\n---\n\nReturns GTIN / EAN for an index (which has to be inside the bounds of `manager.contingent`)\n\n```ts\nmanager.index(0) === '1234567800004'    // true\nmanager.index(9999) === '1234567899992' // true\nmanager.index(10000)                    // Error: Index out of bounds\nmanager.index(-1)                       // Error: Index out of bounds\n```\n\n\u003ca id='generator-all'\u003e\u003c/a\u003e\n`manager.all`\n---\n\nReturns an array of all possible GTINs / EANs for the GCP.\n\n\n```ts\nmanager.all === ['1234567800011', '1234567800028', ... 9998 more items] // true\n```\n\n\n\u003ch6 align=\"center\"\u003e▌║║█║║▌█║▌║║▌║▌\u003c/h6\u003e\n\n---\n\n*🌻 Thanks to [xbpf/gtin](https://github.com/xbpf/gtin) for providing functions used in this repository.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friennevaplus%2Fgtin-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Friennevaplus%2Fgtin-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friennevaplus%2Fgtin-manager/lists"}