A wrapper for mcc-mnc lookup.
The source file is taken from musalbas's mcc-mnc-table repo.
Install the package using npm install mcc-mnc
.
After installation, include it and instantiate it to use it:
var MccMnc = require('mcc-mnc');
var mccMnc = new MccMnc();
Available methods are:
mcc(int)
Filter bymcc
mnc(int)
Filter bymnc
country(string)
Filter bycountry
network(string)
Filter bynetwork
countryCode(string)
Filter bycountry_code
get()
Returns all the matched filtersclear()
Clears the search filter.
const MccMnc = require('mcc-mnc');
const mccMnc = new MccMnc();
const match = mccMnc.mcc(310).mnc(330).get();
console.log(match);
Returns:
{
network: 'T-Mobile',
country: 'United States',
mcc: '310',
iso: 'us',
country_code: '1',
mnc: '330'
}
const MccMnc = require('mcc-mnc');
const mccMnc = new MccMnc();
const match = mccMnc.mnc(330).get();
console.log(match);
Returns:
[
{ network: 'Claro/ CTI/AMX',
country: 'Argentina Republic',
mcc: '722',
iso: 'ar',
country_code: '54',
mnc: '330' },
{ network: 'Michigan Wireless LLC',
country: 'United States',
mcc: '311',
iso: 'us',
country_code: '1',
mnc: '330' },
{ network: 'T-Mobile',
country: 'United States',
mcc: '310',
iso: 'us',
country_code: '1',
mnc: '330' }
]
If no match is found, -1
is returned.