mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-22 15:56:16 -04:00
Updated dependencies
This commit is contained in:
parent
0cea56dc62
commit
d469fb9c58
6 changed files with 913 additions and 695 deletions
|
@ -38,7 +38,9 @@ class ToMessagePack extends Operation {
|
|||
if (ENVIRONMENT_IS_WORKER()) {
|
||||
return notepack.encode(input);
|
||||
} else {
|
||||
return notepack.encode(input).buffer;
|
||||
const res = notepack.encode(input);
|
||||
// Safely convert from Node Buffer to ArrayBuffer using the correct view of the data
|
||||
return (new Uint8Array(res)).buffer;
|
||||
}
|
||||
} catch (err) {
|
||||
throw new OperationError(`Could not encode JSON to MessagePack: ${err}`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue