
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
validate_nigerian_phone
Advanced tools
A JS package to validate and format a Nigerian phone number as well as deduce the network provider or area code.
Nigerian Phone Number Validator (JS)
A JS package to validate and format a Nigerian phone number as well as deduce the network provider or area code.
Install using npm: npm install validate_nigerian_phone
Install using yarn: yarn add validate_nigerian_phone
const NigerianPhone = require('validate_nigerian_phone');
const phone = new NigerianPhone('+2348135087966');
// Check if is valid
phone.isValid(); // true
// Get formatted
phone.formatted(); // 08135087966
// Get Network
phone.getNetwork(); // mtn
// Check if is mtn
phone.isMtn(); // True
// Get network from phone number prefix e.g
phone.getNetworkByPrefix('0703'); // mtn
Check out the issues on GitHub and/or make a pull request to contribute!
FAQs
A JS package to validate and format a Nigerian phone number as well as deduce the network provider or area code.
We found that validate_nigerian_phone demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.