Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@redkassa/phone-parser-default-set

Package Overview
Dependencies
Maintainers
3
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@redkassa/phone-parser-default-set

This set with default formats and resolvers and also helper functions for RedKassa.

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
3
Weekly downloads
 
Created
Source

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,
});

/*

result1 = {
  code: 'RU',
  dialCode: '+7',
  nationalNumber: '9198221234',
  formattedNumber: '+7 (919) 822 1234',
}

result2 = {
  code: 'IN',
  dialCode: '+91',
  nationalNumber: '98221234',
  formattedNumber: '+91 98221234',
}

*/

FAQs

Package last updated on 25 Feb 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc