MCPcopy Index your code
hub / github.com/nodejs/node / getRawAsset

Function getRawAsset

lib/sea.js:23–35  ·  view source on GitHub ↗

* Look for the asset in the injected SEA blob using the key. If * no matching asset is found an error is thrown. The returned * ArrayBuffer should not be mutated or otherwise the process * can crash due to access violation. * @param {string} key * @returns {ArrayBuffer}

(key)

Source from the content-addressed store, hash-verified

21 * @returns {ArrayBuffer}
22 */
23function getRawAsset(key) {
24 validateString(key, 'key');
25
26 if (!isSea()) {
27 throw new ERR_NOT_IN_SINGLE_EXECUTABLE_APPLICATION();
28 }
29
30 const asset = getAssetInternal(key);
31 if (asset === undefined) {
32 throw new ERR_SINGLE_EXECUTABLE_APPLICATION_ASSET_NOT_FOUND(key);
33 }
34 return asset;
35}
36
37/**
38 * Look for the asset in the injected SEA blob using the key. If the

Callers 4

getAssetFunction · 0.85
getAssetAsBlobFunction · 0.85
sea.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…