mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-27 08:21:03 +02:00
18 lines
445 B
JavaScript
18 lines
445 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 = () => { throw new Error('Not implemented'); }
|
|
|
|
export { shim }; |