Need private packages and team management tools?Check out npm Teams »

mctrackerlist

1.0.1 • Public • Published

McTrackerList

A Tracking Protection List lib for node and the browser

usage

  var McTrackerList = require("mctrackerlist")
 
  mc = new McTrackerList([
    // blacklist domain
    '-d www.google.com',
    // whitelist domain
    '+d www.elephantmouse.com',
    // blacklist substring
    '- chickenwing.cup',
    // whitelist substring
    '+ bee/hut'
  ])
 
  mc.match('www.google.com') // true
  mc.match('www.google.com/bee/hut') // false
  mc.match('www.sidewalk.com/chickenwing.cup') // true
  mc.match('www.elephantmouse.com/chickenwing.cup') // false
 
  // update rules
  mc.compile([
    // whitelist domain
    '+d www.google.com',
    // blacklist domain
    '-d www.elephantmouse.com',
    // blacklist substring
    '- chickenwing.cup',
    // whitelist substring
    '+ bee/hut'
  ])

run tests

make test

Keywords

none

Install

npm i mctrackerlist

DownloadsWeekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

254 kB

Total Files

9

Last publish

Collaborators

  • avatar
  • avatar