Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zswang/icity
Get the tools for the city where your phone number is located
https://github.com/zswang/icity
city mobile phone
Last synced: 16 days ago
JSON representation
Get the tools for the city where your phone number is located
- Host: GitHub
- URL: https://github.com/zswang/icity
- Owner: zswang
- License: mit
- Created: 2017-10-26T01:40:24.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-26T12:40:43.000Z (about 7 years ago)
- Last Synced: 2024-10-14T11:49:44.378Z (30 days ago)
- Topics: city, mobile, phone
- Language: TypeScript
- Size: 152 KB
- Stars: 43
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
icity
-----------# [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][coverage-image]][coverage-url]
Get the tools for the city where your phone number is located
## Usage 使用方法
```shell
$ npm install icity --save
```## Examples 示例
```js
console.log(JSON.stringify(icity.parse('13810570000')))
// > {"province":"北京","city":"北京","areaCode":"010","provider":"中国移动"}console.log(JSON.stringify(icity.parse('13820570000')))
// > {"province":"天津","city":"天津","areaCode":"022","provider":"中国移动"}
```## License
MIT © [zswang](http://weibo.com/zswang)
[npm-url]: https://npmjs.org/package/icity
[npm-image]: https://badge.fury.io/js/icity.svg
[travis-url]: https://travis-ci.org/zswang/icity
[travis-image]: https://travis-ci.org/zswang/icity.svg?branch=master
[coverage-url]: https://coveralls.io/github/zswang/icity?branch=master
[coverage-image]: https://coveralls.io/repos/zswang/icity/badge.svg?branch=master&service=github