Russian Federation phone operators resource / Нумерация операторов связи РФ (Россвязь)
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 17 commits ahead, 1 commit behind alexander-vl-belokon:default.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
data
download
examples
lib
test
tools
.gitignore
.npmignore
Gruntfile.js
README.md
index.js
ncli.js
package.json

README.md

numcap

Phone numbers of all operators in Russian Federation

Find region and phone operator by number

Actual data: 08.10.2015

Install

npm install numcap --save

Usage

var numcap = require('numcap');

var finder = new numcap();

finder.getData("8-913-529-29-26", function (err, data) {
    console.log(err, data);
});

Output data object:

{ code: '913',
  begin: '4900000',
  end: '5399999',
  capacity: '500000',
  operator: 'Мобильные ТелеСистемы',
  region: 'Красноярский край' }


Update data

Numcap contain JSON files with data of resource, but you can use ncli.js for update data

Run from directory of your project

node ./node_modules/numcap/ncli.js --download

node ./node_modules/numcap/ncli.js --csv2json

Use mongodb

Load data to mongodb use ncli.js

Run from directory of your project

npm install mongodb --save

node ./node_modules/numcap/ncli.js --json2mongo [--host=localhost --port=27017 --db=capacity --collection=capacity]

Example

var numcap = require('numcap');

var finder = new numcap({type: 'mongo', options: {host: '192.168.1.1'}});

finder.getData("8-913-529-29-26", function (err, data) {
    console.log(err, data);
});

Links

  1. Number resource of Russian phone operators
  2. Passport of open data