bfs

    1.0.0 • Public • Published

    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)

    Install

    npm i bfs

    DownloadsWeekly Downloads

    106

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    7.01 kB

    Total Files

    5

    Last publish

    Collaborators

    • hirokiosame