import disposable from "@dahoom/disposable-email";
const email = '[email protected]';
//returns true if the email is disposable, false if not
const temp = disposable.validate(email);
if(!temp){
return 'disposable emails are not allowed';
}
如果您只想导入函数本身:
import { validate } from "@dahoom/disposable-email";
const email = '[email protected]';
//returns true if the email is disposable, false if not
const temp = validate(email);
if(!temp){
return 'disposable emails are not allowed';
}