find-data

1.0.1 • Public • Published

find-data

This is useful when you are working with a poorly documented API and want to find out how it is storing a given piece of data.

Examples:

var a = {
    hello: {
        best: [
            "apple",
            "friend",
            "toad"
        ],
        other: 2,
        nope: function(){
 
        }
    },
    is: "this",
    friend: {
        has: "options"
        including: {
            other: "friends"
        }
    }
};
 
console.log(JSON.stringify(find('friend', a), null, 2));

Outputs:

{
    hello: {
        best: [
            null,
            "friend",
            null
        ],
    },
    friend: {
        including: {
            other: "friends"
        }
    }
};

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i find-data

      Weekly Downloads

      1

      Version

      1.0.1

      License

      BSD-3-Clause

      Last publish

      Collaborators

      • ofer.sadgat