MCPcopy
hub / github.com/gchq/CyberChef / enumLookup

Method enumLookup

src/core/Dish.mjs:99–122  ·  view source on GitHub ↗

* Returns the data type string for the given type enum. * * @param {number} typeEnum - The enum value of the data type. * @returns {string} The data type as a string.

(typeEnum)

Source from the content-addressed store, hash-verified

97 * @returns {string} The data type as a string.
98 */
99 static enumLookup(typeEnum) {
100 switch (typeEnum) {
101 case Dish.BYTE_ARRAY:
102 return "byteArray";
103 case Dish.STRING:
104 return "string";
105 case Dish.NUMBER:
106 return "number";
107 case Dish.HTML:
108 return "html";
109 case Dish.ARRAY_BUFFER:
110 return "ArrayBuffer";
111 case Dish.BIG_NUMBER:
112 return "BigNumber";
113 case Dish.JSON:
114 return "JSON";
115 case Dish.FILE:
116 return "File";
117 case Dish.LIST_FILE:
118 return "List<File>";
119 default:
120 throw new DishError("Invalid data type enum. No matching type.");
121 }
122 }
123
124
125 /**

Callers 9

bakeMethod · 0.80
inputTypeMethod · 0.80
outputTypeMethod · 0.80
presentTypeMethod · 0.80
setMethod · 0.80
getTitleMethod · 0.80
_translateMethod · 0.80
_toArrayBufferMethod · 0.80
_fromArrayBufferMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected