0.2.5 • Published 6 years ago

contains-ads v0.2.5

Weekly downloads
7
License
MPL
Repository
github
Last release
6 years ago

Contains Ads

Checks if the specified url contains advertisements.

$ yarn add contains-ads
const { client, initialize, containsAds } = require('contains-ads');

initialize().then(() => {

  // Easylist is the used by default, but you can add custom rules.
  // Visit abp for more information (https://adblockplus.org/filters).
  client.parse('||blacklistwebsite.com')
  client.parse('@@||whitelistwebsite.com');
  
  containsAds('http://www.twitter.com');          // False
  containsAds('http://www.blabal.com&ad_type_');  // True
});
# Development commands -
$ yarn test     # Runs the tests
$ yarn build    # Parses the list of blocked sites
$ yarn update   # Updates the list of blocked sites
0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago