MCPcopy Index your code
hub / github.com/pomber/code-surfer / isCode

Function isCode

packs/code-surfer/src/step-reader.js:3–5  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

1import { parseMetastring } from "./codeblock-metastring-parser";
2
3export function isCode(element) {
4 return element && element.props && element.props.mdxType === "pre";
5}
6
7export function readStepFromElement(element) {
8 if (!isCode(element)) {

Callers 2

getColumnsFromChildrenFunction · 0.90
readStepFromElementFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected