Skip to content

fetch()

paige edited this page Nov 17, 2023 · 6 revisions

fetches the data of a function
type: Function

arguments:

  • f Function
    function input to fetch from
    works with most functions
  • ?callback Function
    optional function that runs when the function data is fetched
  • ?catcher Function
    optional function that catches errors

JS Output
const fndt = require('fndt');


function test(a, b="placeholder") {       
    console.log(a, b);
}


fndt.fetch(test, (data) => {
    console.log(data);
});
FunctionData {
    pending: false,
    name: "test",
    dataName: "test",
    body: "console.log(a, b);",
    arguments: { a: null, b: "placeholder" },
    data: Function,
    string: "function test(a, b="placeholder") {
        console.log(a, b);
    }"
}


fndt docs

πŸ›ˆ FunctionData

πŸ›ˆ fetch()

πŸ›ˆ fetchSync()

Clone this wiki locally