UNPKG

@ea-lab/reactive-json

Version:

A REACT-based lib that transforms JSON (or YAML) into interactive HTML markup.

19 lines (18 loc) 538 B
import { evaluateTemplateValue as i } from "../../engine/TemplateSystem.js"; const n = async (t) => { var e; const { globalDataContext: o, templateContext: l } = t, a = i({ valueToEvaluate: (e = t == null ? void 0 : t.args) == null ? void 0 : e.value, globalDataContext: o, templateContext: l }); if (typeof a == "string") try { await navigator.clipboard.writeText(a.toString()); } catch (r) { console.error("Failed to copy data to the clipboard:", r); } }; export { n as setClipboardData };