0.0.6 • Published 7 years ago

@snek/syncify v0.0.6

Weekly downloads
2,016
License
MIT
Repository
github
Last release
7 years ago

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'
0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago