Files
IOT-recept-printer/node_modules/snekfetch/sync.js
2018-07-17 14:57:52 +01:00

19 lines
330 B
JavaScript

'use strict';
let syncify;
try {
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;