knsv/mermaid

View on GitHub
packages/mermaid/src/interactionDb.ts

Summary

Maintainability
A
0 mins
Test Coverage
let interactionFunctions: (() => void)[] = [];
export const addFunction = (func: () => void) => {
  interactionFunctions.push(func);
};
export const attachFunctions = () => {
  interactionFunctions.forEach((f) => {
    f();
  });
  interactionFunctions = [];
};