0.0.1 • Published 9 months ago

tree-mgmt v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

Tree-Mgmt

Provides tree format data to find, modify, delete, edit and other operations

English | 中文

import

  1. esmodule
import treeMgmt from 'tree-mgmt'
  1. browser
<script src="https://cdn.jsdelivr.net/npm/tree-mgmt"></script>

api

/*
 * Note:
 * fcnMsgArry is a tree-structured data that has two properties: fcnNm and children.
 * `fcnNm` can be replaced with any field value, while `children` link to his children node.
 */
import treeMgmt from 'tree-mgmt'
import fcnMsgArry from './fcnMsgArry.json'

const val = 'any val'
const filteredTree = treeMgmt(
    fcnMsgArry,
    (node) => node.fcnNm.includes(val),
  )

dev

npm install

then

npm run dev

openpage: http://127.0.0.1:8080/test/usecase/demo.html

build

npm run build
0.0.1

9 months ago

0.0.1-alpha.0

9 months ago