1.0.3 • Published 2 years ago

gs1-prefix-code-to-country-code v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

GS1-Prefix-Code-To-Country-Code"

Get Country Info With GS1 Code

import {GS1PrefixCodeToCountryCode} from "gs1-prefix-code-to-country-code"
const gs1Code = 626;
const countryInfo = GS1PrefixCodeToCountryCode(gs1Code);
if (countryInfo) {
  console.log(`کد GS1 ${gs1Code} به کشور ${countryInfo.name} (${countryInfo.alpha2}) ترجمه شد.`);
} else {
  console.log(`کد GS1 ${gs1Code} معتبر نیست.`);
}
//result => `کد GS1 626 به کشور ایران  IR ترجمه شد.`

Installation

Before installing, download and install Node.js. Node.js 0.10 or higher is required.

Installation is done using the npm install command:

$ npm install gs1-prefix-code-to-country-code
1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago