MCPcopy Index your code
hub / github.com/codex-team/editor.js / isToolConvertable

Function isToolConvertable

src/components/utils/tools.ts:10–18  ·  view source on GitHub ↗
(tool: BlockToolAdapter, direction: 'export' | 'import')

Source from the content-addressed store, hash-verified

8 * @param direction - export for tool to merge from, import for tool to merge to
9 */
10export function isToolConvertable(tool: BlockToolAdapter, direction: 'export' | 'import'): boolean {
11 if (!tool.conversionConfig) {
12 return false;
13 }
14
15 const conversionProp = tool.conversionConfig[direction];
16
17 return isFunction(conversionProp) || isString(conversionProp);
18}

Callers 2

isBlockConvertableFunction · 0.90

Calls 2

isFunctionFunction · 0.90
isStringFunction · 0.90

Tested by

no test coverage detected