1.0.4 • Published 8 months ago

react-native-country-calling-code-extractor v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
8 months ago

react-native-country-calling-code-extractor

A React Native library for extracting country calling codes and phone numbers without country codes, simplifying international phone number management in your app.

Installation

You can install this package via npm or yarn.

npm install react-native-country-calling-code-extractor
# or
yarn add react-native-country-calling-code-extractor

Usage

Import the library into your React Native project:

import { extractCallingCodeAndNumber } from "react-native-country-calling-code-extractor";
Extracting Country Calling Code and Number

To extract the country calling code and the phone number without the country code using your custom function:

import { extractCallingCodeAndNumber } from "react-native-country-calling-code-extractor";

const phoneNumber = "+1xxxxxxxxxx";
const { callingCode, numberWithoutCallingCode } =
  extractCallingCodeAndNumber(phoneNumber);

console.log("Calling Code:", callingCode);
console.log("Phone Number without Country Code:", numberWithoutCallingCode);

License This library is licensed under the MIT License.


1.0.4

8 months ago

1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago