summaryrefslogtreecommitdiff
path: root/node_modules/snekfetch/sync.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/snekfetch/sync.js')
-rw-r--r--node_modules/snekfetch/sync.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/node_modules/snekfetch/sync.js b/node_modules/snekfetch/sync.js
new file mode 100644
index 0000000..5531136
--- /dev/null
+++ b/node_modules/snekfetch/sync.js
@@ -0,0 +1,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;