-
Notifications
You must be signed in to change notification settings - Fork 0
fetchSync()
paige edited this page Nov 17, 2023
·
1 revision
fetches the data of a function in sync (WARNING: may cause code hanging)
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);
}
console.log(fndt.fetchSync(test)) |
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);
}"
} |