Skip to content

Commit

Permalink
doc: fix sea assets example
Browse files Browse the repository at this point in the history
PR-URL: #54192
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
Sadzurami authored and targos committed Aug 14, 2024
1 parent dafe975 commit 2f5309f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions doc/api/single-executable-applications.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ executable, users can retrieve the assets using the [`sea.getAsset()`][] and
The single-executable application can access the assets as follows:
```cjs
const { getAsset } = require('node:sea');
const { getAsset, getAssetAsBlob, getRawAsset } = require('node:sea');
// Returns a copy of the data in an ArrayBuffer.
const image = getAsset('a.jpg');
// Returns a string decoded from the asset as UTF8.
Expand All @@ -230,7 +230,7 @@ const blob = getAssetAsBlob('a.jpg');
const raw = getRawAsset('a.jpg');
```
See documentation of the [`sea.getAsset()`][] and [`sea.getAssetAsBlob()`][]
See documentation of the [`sea.getAsset()`][], [`sea.getAssetAsBlob()`][] and [`sea.getRawAsset()`][]
APIs for more information.
### Startup snapshot support
Expand Down Expand Up @@ -429,6 +429,7 @@ to help us document them.
[`require.main`]: modules.md#accessing-the-main-module
[`sea.getAsset()`]: #seagetassetkey-encoding
[`sea.getAssetAsBlob()`]: #seagetassetasblobkey-options
[`sea.getRawAsset()`]: #seagetrawassetkey
[`v8.startupSnapshot.setDeserializeMainFunction()`]: v8.md#v8startupsnapshotsetdeserializemainfunctioncallback-data
[`v8.startupSnapshot` API]: v8.md#startup-snapshot-api
[documentation about startup snapshot support in Node.js]: cli.md#--build-snapshot
Expand Down

0 comments on commit 2f5309f

Please sign in to comment.