JS Installation
You can contribute to the package by visiting the GitHub repository (opens in a new tab).
You can install the package via npm:
npm install @usevalid-email/js-sdk
Or yarn:
yarn add @usevalid-email/js-sdk
Or Bun.js:
bun add @usevalid-email/js-sdk
Usage
// using Sdk
import Sdk from "@usevalid-email/js-sdk";
const sdk = new Sdk("your-api-key");
const { validator } = sdk;
const email = "test@gmail.com";
validator.validate(email).then((response) => {
console.log(response);
});
or
// using useValidEmail
import { useValidEmail } from "@usevalid-email/js-sdk";
const validator = useValidEmail("your-api-key");
const email = "test@gmail.com";
validator.validate(email).then((response) => {
console.log(response);
});