mirror of https://github.com/laurent22/joplin.git
15 lines
274 B
JavaScript
15 lines
274 B
JavaScript
|
let shim = {};
|
||
|
|
||
|
shim.fetch = typeof fetch !== 'undefined' ? fetch : null;
|
||
|
|
||
|
if (!shim.fetch) {
|
||
|
let moduleName = 'node-fetch';
|
||
|
shim.fetch = require(moduleName);
|
||
|
}
|
||
|
|
||
|
if (!shim.FormData) {
|
||
|
let moduleName = 'form-data';
|
||
|
shim.FormData = require(moduleName);
|
||
|
}
|
||
|
|
||
|
export { shim };
|