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.
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');