Documentationcurrent version
Help us improve the docs by fixing typos and proposing enhancements.

Nikita

Children

A Nikita session is organized as a hierarchical tree of action. Actions have parent and children. The children are the actions executed in the handler of a parent action.

The children property of an action exposes an array with all the executed actions inside of it. In the handler function, children is a property available inside its first argument.

Properties

The child action objects contain the following properties:

Usage

The children property of the parent action is enriched once a child action complete its execution, wether it is fulfilled or rejected. Thus, it is accessed using the async/await operators:

nikita
// Call a parent action
.call(async function({children}) {
  // Call a child action and wait until it is executed
  await this.call(() => true)
  // Print children
  console.info(children)
})
Edit on GitHub
Navigate
About

Nikita is an open source project hosted on GitHub and developed by Adaltas.