Tree
/ API Reference
Tree
/ API Reference

create

Creates a new node with a unique id.

The Gist

import { create } from '@weser/tree'

const node = create({
  children: [],
})

Parameters

ParameterTypeDescription
nodeT_BaseNodeInputThe node to create.

Returns

(T) A new node with a unique id.

On this page