* 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)
| 21 | * @returns {ArrayBuffer} |
| 22 | */ |
| 23 | function 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 |
no outgoing calls
no test coverage detected
searching dependent graphs…