yandex-metrica-normalize-contact-info
v0.0.4
Published
Yandex metrica normalization code for phone numbers and emails
Downloads
14
Maintainers
Readme
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('[email protected]');
const normalizedPhone = processPhoneNumber(window, '+7890123456');