-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement compact in-memory representation and lazy loading * [BREAKING] serialization module has been removed, instead, each class now provides a `serialize` method as well as a static method `deserialize`. * [BREAKING] FiltersEngine now exposes different methods for update: `update` which expects a diff of filters, `updateList` and `updateResources`. This API should be a cleared and allows using the adblocker without managing filters lists. * [BREAKING] ReverseIndex' API dropped the use of a callback to specify filters and instead expects a list of filters. * [BREAKING] parsing and matching filters can now be done using methods of the filters classes directly instead of free functions. For example NetworkFilter has a `parse` and `match` method (with the same expected arguments). * ReverseIndex is now implemented using a very compact representation (stored in a typed array). * `toString` method of filters should now be more accurate. * Addition of numerous unit tests (coverage is now >90%)
- Loading branch information
Showing
39 changed files
with
5,877 additions
and
3,718 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,16 @@ | ||
// Cosmetic injection | ||
export { default as injectCosmetics, IMessageFromBackground } from './src/cosmetics-injection'; | ||
|
||
// Blocking | ||
export { default as FiltersEngine } from './src/engine/engine'; | ||
export { default as ReverseIndex } from './src/engine/reverse-index'; | ||
export { default as Request, makeRequest } from './src/request'; | ||
export { deserializeEngine } from './src/serialization'; | ||
export { default as CosmeticFilter } from './src/filters/cosmetic'; | ||
export { default as NetworkFilter } from './src/filters/network'; | ||
|
||
export { default as matchCosmeticFilter } from './src/matching/cosmetics'; | ||
export { default as matchNetworkFilter } from './src/matching/network'; | ||
|
||
export { parseCosmeticFilter } from './src/parsing/cosmetic-filter'; | ||
export { parseNetworkFilter } from './src/parsing/network-filter'; | ||
export { f, parseList } from './src/parsing/list'; | ||
export { f, List, default as Lists, parseFilters } from './src/lists'; | ||
|
||
export { compactTokens, hasEmptyIntersection, mergeCompactSets } from './src/compact-set'; | ||
|
||
export { fetchLists, fetchResources } from './src/fetch'; | ||
export { tokenize, fastHash, updateResponseHeadersWithCSP } from './src/utils'; | ||
export { default as StaticDataView } from './src/data-view'; |
Oops, something went wrong.