UNPKG

fraud-check

Version:

Fraud Checker

76 lines (51 loc) 1.77 kB
# Fraud Check - V1 ## Installation This is a [Node.js](https://nodejs.org/en/) module available through the npm registry. Installation is done using the [npm install command](https://docs.npmjs.com/downloading-and-installing-packages-locally): ```bash npm install fraud-check --save ``` ## Usage ```js const { verify } = require("fraud-check"); // Send the code to the User Email. const getInfo = async (ip) => { const data = { ip, countryArr: ["US", "UK"], }; const auth = await verify(data); console.log(auth); // false = fraud // true = not fraud }; ``` ### data | Option | Type | Default | Description | Required | | ---------- | ------ | ------- | ----------------------------------------------------- | -------- | | ip | String | null | Client ip to check (IPv4 or IPv6) | True | | countryArr | Array | null | fraud all traffic coming from the following countries | False | ## How it Work! Detect VPN servers, open proxies, web proxies, Tor exits, search engine robots, data center ranges, and fraud All the country code you entered previously. This package use [ip-api](http://ip-api.com/) non-commercial API. The free endpoint's limited at 45 requests per minutes. ## A PRO Version ? If you take a pro version of [ip-api](http://ip-api.com/), the package can still work by adding a third parameter: ```js // ... const data = { ip, countryArr: ["US", "UK"], custom: { link: "https://pro.ip-api.com/json/", key: // Your api key } }; const auth = await verify(data); console.log(auth); // false = fraud // true = not fraud }; ``` ## License [MIT](https://choosealicense.com/licenses/mit/)