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