UNPKG

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