tree-helper

WebJar for tree-helper

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

tree-helper
Last Version

Last Version

1.0.5
Release Date

Release Date

Type

Type

jar
Description

Description

tree-helper
WebJar for tree-helper
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/phphe/tree-helper

Download tree-helper

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/tree-helper/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>tree-helper</artifactId>
    <version>1.0.5</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/tree-helper/
implementation 'org.webjars.npm:tree-helper:1.0.5'
// https://jarcasting.com/artifacts/org.webjars.npm/tree-helper/
implementation ("org.webjars.npm:tree-helper:1.0.5")
'org.webjars.npm:tree-helper:jar:1.0.5'
<dependency org="org.webjars.npm" name="tree-helper" rev="1.0.5">
  <artifact name="tree-helper" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='tree-helper', version='1.0.5')
)
libraryDependencies += "org.webjars.npm" % "tree-helper" % "1.0.5"
[org.webjars.npm/tree-helper "1.0.5"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : helper-js jar [1.0.47,2)

Project Modules

There are no modules declared in this project.

tree-helper

js functions, just import needed functions.
js 方法库, 按需使用

// install
npm install tree-helper -S

usage 使用

import {function1, function2} from 'tree-helper'

some functions. pls check source to get more 常用方法, 请查看源码获取更多方法

// depth first search; 深度优先遍历
depthFirstSearch(obj, handler, childrenKey = 'children', reverse)
- handler(item, i, parent)
    return false // break loop
    return 'skip children' // skip children
    return 'skip siblings' // skip siblings
// breadth first search; 广度优先遍历
breadthFirstSearch(obj, handler, childrenKey = 'children', reverse)
- handler(item, i, parent)
    return false // break loop
    return 'skip children' // skip children
    return 'skip siblings' // skip siblings

Versions

Version
1.0.5