summaryrefslogtreecommitdiff
path: root/node_modules/snekfetch/sync.js
blob: 5531136c791722bfbf5e512fe9ac8c8440733f53 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
try {
  var syncify = require('@snek/syncify');
} catch (err) {
  throw new Error('Using sync requires @snek/syncify (npm install @snek/syncify)');
}

const Snekfetch = require('.');

class SnekfetchSync extends Snekfetch {
  end() {
    return syncify(super.end());
  }
}

module.exports = SnekfetchSync;