1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-03 08:35:29 +02:00
joplin/ReactNativeClient/lib/shim.js
2017-07-24 18:01:40 +00:00

17 lines
372 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;
export { shim };