New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

phonecode

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

phonecode

Get countries phone code

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-83.33%
Maintainers
1
Weekly downloads
 
Created
Source

PhoneCode Build Status

Get countries' phone code or do reverse.

Installation

npm i --save phonecode

Usage

Get phone code of a country :

var phonecode = require('phonecode');

var one = phonecode.codeOf('Italy');
console.log(one); // 39

Recognize a number is which country's phone code:

var phonecode = require('phonecode');

var one = phonecode.isCodeOf(91);
console.log(one); // India

Api

codeOf (parameter : string)
Description : returns phone code of a country.
Returns : number

isCodeOf (parameter : number)
Description : returns name of a country which has the phone code.
Returns : string

FAQs

Package last updated on 14 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc