From 2f5309fc227c7c0b13879293946456def09ba7f9 Mon Sep 17 00:00:00 2001 From: Sadzurami <47674424+Sadzurami@users.noreply.github.com> Date: Tue, 6 Aug 2024 11:24:23 +0300 Subject: [PATCH] doc: fix sea assets example PR-URL: https://github.com/nodejs/node/pull/54192 Reviewed-By: Chengzhong Wu Reviewed-By: Luigi Pinca --- doc/api/single-executable-applications.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/api/single-executable-applications.md b/doc/api/single-executable-applications.md index 1e4db62bbd04ea..fb48d31e6271ed 100644 --- a/doc/api/single-executable-applications.md +++ b/doc/api/single-executable-applications.md @@ -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. @@ -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 @@ -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