MCPcopy
hub / github.com/udecode/plate / createDataTransfer

Function createDataTransfer

packages/test-utils/src/createDataTransfer.ts:5–9  ·  view source on GitHub ↗
(dataMap: DataTransferDataMap = new Map())

Source from the content-addressed store, hash-verified

3export type DataTransferDataType = string | 'text/html' | 'text/plain';
4
5export const createDataTransfer = (dataMap: DataTransferDataMap = new Map()) =>
6 ({
7 getData: (type: string) => dataMap.get(type) ?? '',
8 setData: (type: string, value: string) => dataMap.set(type, value),
9 }) as unknown as DataTransfer;

Calls 2

getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…