1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-02-13 19:42:36 +02:00
2017-11-05 16:51:03 +00:00

26 lines
702 B
JavaScript

let shim = {};
shim.isNode = () => {
if (typeof process === 'undefined') return false;
return process.title == 'node';
};
shim.isReactNative = () => {
return !shim.isNode();
};
shim.fetch = typeof fetch !== 'undefined' ? fetch : null;
shim.FormData = typeof FormData !== 'undefined' ? FormData : null;
shim.fs = null;
shim.FileApiDriverLocal = null;
shim.readLocalFileBase64 = (path) => { throw new Error('Not implemented'); }
shim.uploadBlob = () => { throw new Error('Not implemented'); }
shim.setInterval = function(fn, interval) {
return setInterval(fn, interval);
}
shim.clearInterval = function(id) {
return clearInterval(id);
}
shim.detectAndSetLocale = null;
module.exports = { shim };