MCPcopy Create free account
hub / github.com/aghyad97/browserytools / copyCode

Function copyCode

src/components/HttpStatusCodes.tsx:121–128  ·  view source on GitHub ↗
(code: number)

Source from the content-addressed store, hash-verified

119 s.text.toLowerCase().includes(q) ||
120 s.description.toLowerCase().includes(q) ||
121 s.useCase.toLowerCase().includes(q)
122 );
123 });
124 }, [search, activeCategory, translatedCodes]);
125
126 const copyCode = async (code: number) => {
127 try {
128 await navigator.clipboard.writeText(code.toString());
129 toast.success(t("codeCopied", { code }));
130 } catch {
131 toast.error(t("failedToCopy"));

Callers 1

HttpStatusCodesFunction · 0.85

Calls 3

successMethod · 0.80
errorMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected