sync.js 306 B

123456789101112131415
  1. try {
  2. var syncify = require('@snek/syncify');
  3. } catch (err) {
  4. throw new Error('Using sync requires @snek/syncify (npm install @snek/syncify)');
  5. }
  6. const Snekfetch = require('.');
  7. class SnekfetchSync extends Snekfetch {
  8. end() {
  9. return syncify(super.end());
  10. }
  11. }
  12. module.exports = SnekfetchSync;