1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-25 03:43:25 +01:00

Fix npm documentation

Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3402
This commit is contained in:
Raymond Hill 2024-10-06 16:29:42 -04:00
parent ccbf957f55
commit 9233e6b7c6
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -44,7 +44,7 @@ const { StaticNetFilteringEngine } = await import('@gorhill/ubo-core');
Create an instance of SNFE:
```js
const snfe = StaticNetFilteringEngine.create();
const snfe = await StaticNetFilteringEngine.create();
```
Feed the SNFE with filter lists -- `useLists()` accepts an array of
@ -54,8 +54,8 @@ through the `raw` property, and optionally the name of the list through the
```js
await snfe.useLists([
fetch('easylist').then(raw => ({ name: 'easylist', raw })),
fetch('easyprivacy').then(raw => ({ name: 'easyprivacy', raw })),
fetch('easylist').then(r => r.text()).then(raw => ({ name: 'easylist', raw })),
fetch('easyprivacy').then(r => r.text()).then(raw => ({ name: 'easyprivacy', raw })),
]);
```