Skip to content
This repository has been archived by the owner on Sep 19, 2020. It is now read-only.

devsnek/syncify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

syncify

(this is not something you should use in prod)

const syncify = require('@snek/syncify');

const p0 = new Promise((r) => {
  setTimeout(() => r('works'), 1000);
});

// blocks for 1000ms
console.log(syncify(p0)); // 'works!'

const p1 = Promise.reject(new Error('aaaa'));

syncify(p1); // Error: 'aaaa'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published