Skip to content

Commit 4e7edc4

Browse files
Sadzuramitargos
authored andcommittedOct 2, 2024
doc: fix sea assets example
PR-URL: #54192 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent d478db7 commit 4e7edc4

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
@@ -421,6 +421,7 @@ to help us document them.
421421
[`require.main`]: modules.md#accessing-the-main-module
422422
[`sea.getAsset()`]: #seagetassetkey-encoding
423423
[`sea.getAssetAsBlob()`]: #seagetassetasblobkey-options
424+
[`sea.getRawAsset()`]: #seagetrawassetkey
424425
[`v8.startupSnapshot.setDeserializeMainFunction()`]: v8.md#v8startupsnapshotsetdeserializemainfunctioncallback-data
425426
[`v8.startupSnapshot` API]: v8.md#startup-snapshot-api
426427
[documentation about startup snapshot support in Node.js]: cli.md#--build-snapshot

0 commit comments

Comments
 (0)
Please sign in to comment.