gs1-prefix-code-to-country-code
v1.0.3
Published
GS1-Prefix-Code-To-Country-Code" Get Country Info With GS1 Code -----------------------------------------------
Downloads
1
Readme
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