@ghostery/trackerdb 1.0.23 → 1.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,9 +24,11 @@ It is also used by universities, journalists, and companies that want to underst
|
|
|
24
24
|
The Ghostery Tracker Database comes with a JavaScript SDK. Sample usage:
|
|
25
25
|
|
|
26
26
|
```js
|
|
27
|
+
import { readFileSync } from 'node:fs';
|
|
27
28
|
import loadTrackerDB from '@ghostery/trackerdb';
|
|
28
29
|
|
|
29
|
-
const
|
|
30
|
+
const engine = readFileSync('./node_modules/@ghostery/trackerdb/dist/trackerdb.engine');
|
|
31
|
+
const trackerDB = await loadTrackerDB(engine);
|
|
30
32
|
|
|
31
33
|
const domainMatches = await trackerDB.matchDomain('google.com');
|
|
32
34
|
|