@7rabbit/tree

Object/Action Tree Builder

Usage no npm install needed!

<script type="module">
  import 7rabbitTree from 'https://cdn.skypack.dev/@7rabbit/tree';
</script>

README















tree

Object/Action Tree Resolver



IntroductionInstallationIllustration




Introduction

Installation

npm install @7rabbit/tree

Illustration

import tree from '@7rabbit/tree'

const Ink = require('@7rabbit/ink')
const tree = require('./')

const ink = new Ink()
ink.attachModule(tree(mount))
ink.invokeAction('start').then(x => console.log(x))

function mount({ stack, field, route, batch, cause, queue }) {
  return stack(
    field('foo', 5),
    route('foo', foo),
    route('bar', bar),
    route('baz', baz),
    route('start', start),
  )
}