Skip to content

Commit 2f5309f

Browse files
Sadzuramitargos
authored andcommitted
doc: fix sea assets example
PR-URL: #54192 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent dafe975 commit 2f5309f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: doc/api/single-executable-applications.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ executable, users can retrieve the assets using the [`sea.getAsset()`][] and
219219
The single-executable application can access the assets as follows:
220220
221221
```cjs
222-
const { getAsset } = require('node:sea');
222+
const { getAsset, getAssetAsBlob, getRawAsset } = require('node:sea');
223223
// Returns a copy of the data in an ArrayBuffer.
224224
const image = getAsset('a.jpg');
225225
// Returns a string decoded from the asset as UTF8.
@@ -230,7 +230,7 @@ const blob = getAssetAsBlob('a.jpg');
230230
const raw = getRawAsset('a.jpg');
231231
```
232232
233-
See documentation of the [`sea.getAsset()`][] and [`sea.getAssetAsBlob()`][]
233+
See documentation of the [`sea.getAsset()`][], [`sea.getAssetAsBlob()`][] and [`sea.getRawAsset()`][]
234234
APIs for more information.
235235
236236
### Startup snapshot support
@@ -429,6 +429,7 @@ to help us document them.
429429
[`require.main`]: modules.md#accessing-the-main-module
430430
[`sea.getAsset()`]: #seagetassetkey-encoding
431431
[`sea.getAssetAsBlob()`]: #seagetassetasblobkey-options
432+
[`sea.getRawAsset()`]: #seagetrawassetkey
432433
[`v8.startupSnapshot.setDeserializeMainFunction()`]: v8.md#v8startupsnapshotsetdeserializemainfunctioncallback-data
433434
[`v8.startupSnapshot` API]: v8.md#startup-snapshot-api
434435
[documentation about startup snapshot support in Node.js]: cli.md#--build-snapshot

0 commit comments

Comments
 (0)