synchronify
v1.3.1
Published
Go away, Promise!
Downloads
14
Maintainers
Readme
SYNChronify
This will turn any async function into a sync function.
Usage (Example: HardTTP module by me(TudbuT)):
const synchronify = require("synchronify");
function someSyncFunction() {
return synchronify(async () => {
const {get} = require("hardttp");
//NOTE: The function MUST require all dependencies itself!
return await get("http://tudbut.glitch.me");
})
}
console.log(someSyncFunction());
//Logs the contents of the website tudbut.glitch.me