2.0.4 • Published 6 years ago
inspection_area v2.0.4
Inspection_area
Check whether the name entered manually in China's provinces and municipalities is correct
The data of the project area nationwide come from:modood's Administrative-divisions-of-China
Installtion
npm install inspection_area --save
Use
const inspection = require('inspection_area');
Function
- Check the input provinces and cities are correct
inspection.check(province, city, [area])
return type:boolean
Example:
let isTrue = inspecte.check('北京市', '北京市', '朝阳区');
console.log(isTrue) // true
typeof isTrue // boolean
Contributing
- Fork it
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request
Licence
this repo is released under the WTFPL – Do What the Fuck You Want to Public License.