Skip to main content

NodeJS API

Installation

npm i --save fakefilter

Usage

We provide isFakeDomain and isFakeEmail functions to be implemented from NodeJS.Both return boolean false if there is no match, otherwise they will return the domain which has matched

Basic Usage

See index.js for tests and how to use it.

const { isFakeDomain, isFakeEmail } = require('fakefilter')

console.log(isFakeDomain('domain.com')) // will return false
console.log(isFakeEmail('[email protected]')) // will return false

// domain lookup
console.log(isFakeDomain('afakedomain.com')) // will return 'afakedomain.com'
console.log(isFakeDomain('sub.afakedomain.com')) // will return 'afakedomain.com'
console.log(isFakeDomain('subafakedomain.com')) // will return false

// email lookup
console.log(isFakeEmail('[email protected]')) // will return 'afakedomain.com'
console.log(isFakeEmail('[email protected]')) // will return 'afakedomain.com'
console.log(isFakeEmail('[email protected]')) // will return false