MCPcopy Create free account
hub / github.com/azimjohn/jprq / getMethodColor

Function getMethodColor

cli/debugger/static/script.js:34–46  ·  view source on GitHub ↗
(method)

Source from the content-addressed store, hash-verified

32}
33
34const getMethodColor = (method) => {
35 const colors = {
36 GET: "sky-500",
37 POST: "green-500",
38 PUT: "orange-500",
39 PATCH: "emerald-500",
40 DELETE: "rose-500",
41 HEAD: "indigo-500",
42 OPTIONS: "blue-500",
43 DEFAULT: "gray-500",
44 };
45 return method in colors ? colors[method] : colors["DEFAULT"];
46};
47
48const getStatusColor = (status) => {
49 let first_digit = Math.floor(status / 100);

Callers 1

addRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected