mirror of
https://github.com/gchq/CyberChef
synced 2025-12-10 21:33:36 +00:00
Tests now work
Also they'll work in the node API too now
This commit is contained in:
@@ -28,13 +28,14 @@ class FromMessagePack extends Operation {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {byteArray} input
|
||||
* @param {ArrayBuffer} input
|
||||
* @param {Object[]} args
|
||||
* @returns {JSON}
|
||||
*/
|
||||
run(input, args) {
|
||||
try {
|
||||
return notepack.decode(input);
|
||||
const buf = Buffer.from(new Uint8Array(input));
|
||||
return notepack.decode(buf);
|
||||
} catch (err) {
|
||||
throw new OperationError(`Could not decode MessagePack to JSON: ${err}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user