yandex-metrica-normalize-contact-info
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

Overview

The package is a small library for validation of contact info (phone numbers and emails). The logic mimics the one implemented in Yandex Metrica counter and provides easy means of performing the same operations manually. The normalized data are consistent with these of Yandex Metrica counter firstPartyParams method.

Usage examples

To process the data just import on of the two functions form the library and feed it with the input.

import {
    processEmail,
    processPhoneNumber,
} from 'yandex-metrica-normalize-contact-info';

const normalizedEmail = processEmail('some@mail.com');
const normalizedPhone = processPhoneNumber(window, '+7890123456');

Package Sidebar

Install

npm i yandex-metrica-normalize-contact-info

Weekly Downloads

0

Version

0.0.4

License

MIT

Unpacked Size

17.6 kB

Total Files

5

Last publish

Collaborators

  • yandex-metrica-watch