@igor.dvlpr/adblock-filter-counter
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

adblock-filter-counter

🐲 A dead simple npm module that counts Adblock filter rules.🦘


💖 Support further development

Donate to igorskyflyer



🕵🏼‍♂️ Usage

Install it by executing:

npm i "@igor.dvlpr/adblock-filter-counter"

🤹🏼‍♂️ API

countRules(rules: string): number

Counts Adblock filter rules found in the provided string.


rules - The Adblock filter string to count rules in.


Returns the number of filter rules. Throws a TypeError if no input is passed or if it's not a string.



countFileRules(path: PathLike): number

Counts Adblock filter rules found in the provided file.


path - The path to the file that contains the filter rules to count.


Returns the number of filter rules. Throws an Error if the given path cannot be found.

Package Sidebar

Install

npm i @igor.dvlpr/adblock-filter-counter

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

5.44 kB

Total Files

5

Last publish

Collaborators

  • igor.dvlpr