0.0.14 • Published 10 years ago

numcap v0.0.14

Weekly downloads
4
License
MIT
Repository
github
Last release
10 years ago

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
0.0.14

10 years ago

0.0.13

10 years ago

0.0.12

10 years ago

0.0.11

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago