1.2.39 • Published 6 years ago

bogusfilter v1.2.39

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

Bogus Filter

The node agent that allows you to start filtering out bogus input data from your application.

Documentation

For further up to date usage and documentation, visit docs.bogusfilter.com.

Installation

npm install bogusfilter

Usage

var bogusfilter = require('bogusfilter');

// Note: The filter with the content of someone@competitor.com
// is a global filter added by the Bogus Filter team.
bogusfilter.check('email', 'someone@competitor.com', process.env.BOGUS_API_KEY, true)
.then((res) => {
  console.log(res);
})
.catch((err) => {
  console.log(err);
});

Output will be:

{
  "success": true,
  "query": "someone@competitor.com",
  "bogus": true,
  "group": {
    "_id": "5aab3ea9b7450b00143b093f",
    "title": "Bogus Emails",
    "description": {
      "extended": "",
      "brief": ""
    },
    "images": [],
    "global": true
  },
  "category": {
    "_id": "5aab3ea9b7450b00143b0937",
    "title": "Email",
    "description": "Filtered email addresses.",
    "global": true
  },
  "match": {
    "_id": "5ac060ab6bd2e600149164f5",
    "title": "Landing Page Demo Email Filter",
    "content": "someone@competitor.com",
    "group": "5aab3ea9b7450b00143b093f",
    "category": "5aab3ea9b7450b00143b0937",
    "global": true
  },
  "matches": 8,
  "global": true,
  "timestamp": 1529849129832
}

Or...

// Note: nope.it is NOT a filter that has been set via the
// Bogus Filter dashboard at https://my.bogusfilter.com
bogusfilter.check('email', 'nope.it', process.env.BOGUS_API_KEY, true)
.then((res) => {
  console.log(res);
})
.catch((err) => {
  console.log(err);
});

Output will be:

{
    "success": true,
    "query": "nope.it",
    "bogus": false,
    "group": {
      "_id": "5aab3ea9b7450b00143b093f",
      "title": "Bogus Emails",
      "description": {
        "extended": "",
        "brief": ""
      },
      "images": [],
      "global": true
    },
    "category": {
        "_id": "5aab32edeec8f1287c56b11c",
        "description": "Filtered email addresses.",
        "title": "Email",
        "path": "email"
    },
    "match": null,
    "matches": 1,
    "global": true,
    "timestamp": 1521711746430
}

Tests

npm test

Contributing

In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.

1.2.39

6 years ago

1.2.38

6 years ago

1.2.37

6 years ago

1.2.36

6 years ago

1.2.35

6 years ago

1.2.34

6 years ago

1.2.33

6 years ago

1.2.32

6 years ago

1.2.31

6 years ago

1.2.30

6 years ago

1.2.29

6 years ago

1.2.28

6 years ago

1.2.27

6 years ago

1.2.25

6 years ago

1.2.24

6 years ago

1.2.22

6 years ago

1.2.20

6 years ago

1.2.19

6 years ago

1.2.18

6 years ago

1.2.17

6 years ago

1.2.16

6 years ago

1.2.14

6 years ago

1.2.13

6 years ago

1.2.10

6 years ago

1.2.8

6 years ago

1.2.6

6 years ago

1.2.5

6 years ago

1.2.4

6 years ago

1.2.3

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.9

6 years ago

1.1.8

6 years ago

1.1.7

6 years ago

1.1.6

6 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago