synchronify

1.3.1 • Public • Published

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

Package Sidebar

Install

npm i synchronify

Weekly Downloads

2

Version

1.3.1

License

MIT

Unpacked Size

1.51 kB

Total Files

3

Last publish

Collaborators

  • tudbut