RedKassa Phone Parser Default Set
This set with default formats and resolvers and also helper functions for RedKassa.
⚠️ Important
Required @redkassa/phone-parser (You should add @redkassa/phone-parser from npm)
Installation
npm i @redkassa/phone-parser-default-set --save
or
yarn add @redkassa/phone-parser-default-set
Usage
import { parsePhoneNumber } from '@redkassa/phone-parser';
import { defaultFormats, defaultResolvers } from '@redkassa/phone-parser-default-set';
const result = parsePhoneNumber('12089999999', {
formats: defaultFormats,
resolvers: defaultResolvers,
});
Helpers
parsePriorityRU
import { parsePhoneNumber } from '@redkassa/phone-parser';
import { parsePriorityRU, defaultFormats } from '@redkassa/phone-parser-default-set';
const result1 = parsePriorityRU(parsePhoneNumber, '9198221234', defaultFormats);
const result2 = parsePhoneNumber('9198221234', {
formats: defaultFormats,
});