GithubHelp home page GithubHelp logo

privatenumber / bfs Goto Github PK

View Code? Open in Web Editor NEW
11.0 3.0 0.0 223 KB

Find the path of a value in a complex JavaScript object graph/tree.

License: MIT License

JavaScript 100.00%
bfs breadth-first-search search debugging

bfs's Introduction

bfs Latest version Monthly downloads Install size Bundle size

Find the path of a value in a complex JavaScript object graph/tree.

This module is BFS (Breadth-first Search) as a debugging tool to help with quickly understanding the relationships within an object tree/graph.

If you like this project, please star it & follow me to see what other cool projects I'm working on! ❤️

🚦 Quick Setup

In a local project

npm i --no-save bfs
import BFS from 'bfs';

// Search the global scope for all properties that have the MAX_SAFE_INTEGER value
BFS(global, Number.MAX_SAFE_INTEGER);

In browser dev-tools

const { default: BFS } = await import('//unpkg.com/bfs/dist/bfs.esm.js');

// Search the global scope for all properties that have the MAX_SAFE_INTEGER value
BFS(global, Math.max);

In non ESM environments

(function (cb) {
    var s = document.createElement('script')
    s.src = '//unpkg.com/bfs'
    s.onload = cb
    document.head.appendChild(s)
})(function () {

	// Search the global scope for all properties that have the MAX_SAFE_INTEGER value
    BFS(global, Number.MAX_SAFE_INTEGER);
})

⚙️ Options

  • timeout (10000)
  • maxFinds (100)
  • silenceErrors (true)

bfs's People

Contributors

privatenumber avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.