Skip to content

FunctionData.pending

paige edited this page Nov 17, 2023 · 2 revisions

if the data is pending or not
type: Boolean

JS
const fndt = require('fndt');


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


let fd = fndt.fetch(test, (data) => {
    console.log(data.pending); // after it's done pending
});


console.log(fd.pending); // while it's still pending
Output
true
false


fndt docs

πŸ›ˆ FunctionData

πŸ›ˆ fetch()

πŸ›ˆ fetchSync()

Clone this wiki locally