Skip to content

Commit

Permalink
Improve Node.js documentation clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
MattiSG committed Dec 18, 2024
1 parent 8b9a837 commit cfc1d3d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions content/api/node.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ weight: 1

# Node.js module

As a Node module dependency, the engine exposes a JavaScript API that can be called in your own code. The following modules are available.
As a Node module dependency, the engine exposes a JavaScript API that can be called in your own code.

## `fetch`

The `fetch` module gets the MIME type and content of a document from its URL
`fetch` gets the MIME type and content of a document from its URL

```js
import fetch from '@opentermsarchive/engine/fetch';
Expand All @@ -31,11 +31,11 @@ await fetch({ executeClientScripts: true, ... });
await stopHeadlessBrowser();
```

The `fetch` module options are defined as a [`node-config` submodule](https://github.com/node-config/node-config/wiki/Sub-Module-Configuration). The default `fetcher` configuration can be overridden by adding a `fetcher` object to the local configuration file.
The `fetch` options are defined as a [`node-config` submodule](https://github.com/node-config/node-config/wiki/Sub-Module-Configuration). The default `fetcher` configuration can be overridden by adding a `fetcher` object to the local configuration file.

## `extract`

The `extract` module transforms HTML or PDF content into a Markdown string according to a declaration.
`extract` transforms HTML or PDF content into a Markdown string according to a declaration.

```js
import extract from '@opentermsarchive/engine/extract';
Expand Down

0 comments on commit cfc1d3d

Please sign in to comment.