MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / isReusableEditorState

Function isReusableEditorState

src/lib/editorManager.js:1328–1338  ·  view source on GitHub ↗
(file, signature)

Source from the content-addressed store, hash-verified

1326 }
1327
1328 function isReusableEditorState(file, signature) {
1329 const session = getRawEditorState(file?.session);
1330 return (
1331 !!session &&
1332 !!file.__cmSessionReady &&
1333 file.__cmExtensionSignature === signature &&
1334 !!session.doc &&
1335 typeof session.update === "function" &&
1336 typeof session.facet === "function"
1337 );
1338 }
1339
1340 function getFileLanguageSignature(file, extensionSignature) {
1341 return JSON.stringify({

Callers 1

applyFileToEditorFunction · 0.85

Calls 1

getRawEditorStateFunction · 0.85

Tested by

no test coverage detected