GB/T 2260
Fork from cn/GB2260.js
The latest GB/T 2260 codes. Read the GB2260 Specification.
Installation
Install with npm:
$ npm install gb2260 --save
Usage
var gb2260 = ;// register revision datagb2260
GB2260
var gb = revision;
Interface for GB2260.
.get(code)
Get division for the given code.
var division = gb// <GB/T 2260-201410> 110105 北京市 市辖区 朝阳区 divisionname// 朝阳区divisioncode// 110105divisionrevision// 201410 divisionprovince// <GB/T 2260-201410> 110000 北京市divisionprefecture// <GB/T 2260-201410> 110100 市辖区 division// { name: '朝阳区', code: '110105', revision: 201410 }division// 北京市 市辖区 朝阳区division// 北京市 市辖区 朝阳区
.provinces()
Return a list of provinces in Division data structure.
gb
.prefectures(code)
Return a list of prefecture level cities in Division data structure.
gb
.counties(code)
Return a list of counties in Division data structure.
gb
revisions()
Return a list of available revisions.
gb2260// [ '201410', '201308', ..., '200212']
License
MIT.