canvas-binary-tree
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

canvas-binary-tree

draw binary tree on canvas

install

npm i canvas-binary-tree

usage

import drawTree from "canvas-binary-tree"
 
drawTree(canvas, tree)

api

interface BinaryTreeNode {
  value: any,
  left: BinaryTreeNode,
  right: BinaryTreeNode,
}
 
interface BinaryTree {
  root: BinaryTreeNode,
}
 
drawCanvas(
    canvas: HTMLCanvasElement,
    tree: BinaryTree 
)

Package Sidebar

Install

npm i canvas-binary-tree

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

47.2 kB

Total Files

20

Last publish

Collaborators

  • one-more