mirror of
https://github.com/gchq/CyberChef.git
synced 2025-06-18 20:26:24 -04:00
Merge branch 'dynamic-import' into node-lib-dynamic
This commit is contained in:
commit
39c68ff26e
27 changed files with 264 additions and 62 deletions
|
@ -180,7 +180,7 @@ class Dish {
|
|||
this.value = Array.prototype.slice.call(new Uint8Array(this.value));
|
||||
break;
|
||||
case Dish.BIG_NUMBER:
|
||||
this.value = this.value instanceof BigNumber ? Utils.strToByteArray(this.value.toFixed()) : [];
|
||||
this.value = BigNumber.isBigNumber(this.value) ? Utils.strToByteArray(this.value.toFixed()) : [];
|
||||
break;
|
||||
case Dish.JSON:
|
||||
this.value = this.value ? Utils.strToByteArray(JSON.stringify(this.value, null, 4)) : [];
|
||||
|
@ -277,7 +277,7 @@ class Dish {
|
|||
case Dish.ARRAY_BUFFER:
|
||||
return this.value instanceof ArrayBuffer;
|
||||
case Dish.BIG_NUMBER:
|
||||
return this.value instanceof BigNumber;
|
||||
return BigNumber.isBigNumber(this.value);
|
||||
case Dish.JSON:
|
||||
// All values can be serialised in some manner, so we return true in all cases
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue