
Security News
CISA Kills Off RSS Feeds for KEVs and Cyber Alerts
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
@zene/mobile-number-validator
Advanced tools
A lightweight Javascript library for retrieving country information, including country codes, based on provided data. Simplify your application's logic by seamlessly integrating with this package to extract essential country details, facilitating tasks su
This npm library provides country data validation functionality, allowing you to retrieve data related to phone number lengths by country code.
You can install the library via npm:
npm install my-country-data-library
// Vanilla JS
const { getCountryDataByCode } = require('my-country-data-library');
// React usage
import { getCountryDataByCode } from '@zene/mobile-number-validator';
// Example usage:
const params = {
countryCode: string,
mobileNumber?: string,
internationalValidation?: boolean
}
const countryData = getCountryDataByCode(params);
console.log(countryData);
{
IsError: bool,
Message: 'string',
ReturnObj: {
country: 'string',
phLengthMax: int,
phLengthMin: int,
phExample: 'string',
validNumber?: 'string'
}
}
getCountryDataByCode({ countryCode: string|number, mobileNumber?: string, }): NumberValidationData
Parameter | Type | Description |
---|---|---|
countryCode | number or string | Required. The numeric country code for the desired country |
mobileNumber | string | Mobile number that needs to be verify |
internationalValidation | boolean | allows for an international dialing code to be in the number |
{
country: string;
phLengthMax: number |null;
phLengthMin: number | null;
phExample?: string | number;
validNumber?: string | null;
}
FAQs
A lightweight Javascript library for retrieving country information, including country codes, based on provided data. Simplify your application's logic by seamlessly integrating with this package to extract essential country details, facilitating tasks su
The npm package @zene/mobile-number-validator receives a total of 24 weekly downloads. As such, @zene/mobile-number-validator popularity was classified as not popular.
We found that @zene/mobile-number-validator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.