Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tree-helper

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tree-helper

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

  • 1.0.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.5K
decreased by-13.74%
Maintainers
1
Weekly downloads
 
Created
Source

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

FAQs

Package last updated on 22 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc