有关电话号码的信息 [英] Information about a phone number

查看:28
本文介绍了有关电话号码的信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有用于接收电话号码(任何格式)、将其转换为默认格式并告诉我有关该号码的信息(例如:国家/地区、城市等)的 node.js 的任何库?

解决方案

我不知道有一个,我也搜索了 npm 注册表.

Google 有 libphonenumber 来处理电话号码,并有一个 javascript API.>

来自他们的网站:

<块引用>

Google 用于解析的通用 Java、C++ 和 Javascript 库,格式化、存储和验证国际电话号码.这Java 版本针对在智能手机上运行进行了优化.

还有一个关于获取电话国家代码的 SO 帖子:电话号码国家代码列表

Is there any lib for node.js that receives a phone number (in any format), converts it to a default format and tells me info about the number (e.g: country, city, etc)?

解决方案

I'm not aware of one and I also searched the npm registry.

Google has libphonenumber for dealing with phone numbers and has a javascript API.

From their site:

Google's common Java, C++ and Javascript library for parsing, formatting, storing and validating international phone numbers. The Java version is optimized for running on smartphones.

There's also an SO post on getting phone country codes: List of phone number country codes

这篇关于有关电话号码的信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆