mirror of https://github.com/gorhill/uBlock.git
Fix npm documentation
Related issue: https://github.com/uBlockOrigin/uBlock-issues/issues/3402
This commit is contained in:
parent
ccbf957f55
commit
9233e6b7c6
|
@ -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 })),
|
||||
]);
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue