Skip to content

Instantly share code, notes, and snippets.

@aspirantzhang
aspirantzhang / searchTree.test.ts
Created May 7, 2021
[function] searchTree - find a node in a tree
View searchTree.test.ts
import { searchTree } from '../searchTree';
const validTree = [
{
id: 1,
parent_id: 0,
title: 'Level 1',
value: 1,
children: [
{