beem-validate-contacts
v1.0.3
Published
generic contact validator
Downloads
3
Readme
BEEM VALIDATION SERVICE FOR CONTACTS
The following NPM package is designed to filter and clean user contact details.
The package accepts ONLY accepts an array of objects as input.
Mobile number is manditory header in the file and should match the format below.
- mob_no
Example of a valid mobile number
- 255784861707
Install
npm i beem-validate-contacts
Import
const { contactValidation } = require("beem-validate-contacts");
Usage
(async () => {
try {
let ValidatedContacts = await contactValidation(array);
} catch (error) {
console.log(error);
}
})();
The results can be accessed in the following manner:
ValidatedContacts.DuplicatesContactsCount
ValidatedContacts.InvalidContactsCount
ValidatedContacts.ValidContactsCount
ValidatedContacts.ValidContacts
The function returns statistics on number of Duplicate, Invalid, and Valid contacts as well as the valid contact data