Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
myanmar-phone-number-validator-ts
Advanced tools
A TypeScript library to validate and extract information from Myanmar phone numbers.
A TypeScript library to validate and extract information from Myanmar phone numbers. It is based on the original JavaScript library created by Kaung Myat Lwin, which has been adapted and enhanced to support TypeScript.
To install the package, run:
npm i myanmar-phone-number-validator-ts
The package exports a myanmarPhoneNumber
object with the following functions:
isValidMMPhoneNumber(phoneNumber: string): boolean
Returns true if the input string is a valid Myanmar phone number, false otherwise.
import {myanmarPhoneNumber} from 'myanmar-phone-number-validator';
const phoneNumber = '0949880111';
if (myanmarPhoneNumber.isValidMMPhoneNumber(phoneNumber)) {
// Valid phone number
} else {
// Invalid phone number
}
getTelecomName(phoneNumber: string): string
Returns the name of the telecom operator for the given phone number, or "Unknown" if the operator cannot be determined.
import {myanmarPhoneNumber} from 'myanmar-phone-number-validator';
const phoneNumber = '0949880111';
const telecomName = myanmarPhoneNumber.getTelecomName(phoneNumber);
getPhoneNetworkType(phoneNumber: string): string
Returns the network type of the given phone number, or "Unknown" if the network type cannot be determined.
import {myanmarPhoneNumber} from 'myanmar-phone-number-validator';
const phoneNumber = '0949880111';
const networkType = myanmarPhoneNumber.getPhoneNetworkType(phoneNumber);
This project is licensed under the MIT License.
This library is based on the original JavaScript library created by Kaung Myat Lwin. Thank you for your contribution bro!
FAQs
A TypeScript library to validate and extract information from Myanmar phone numbers.
We found that myanmar-phone-number-validator-ts 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.