2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2024-11-10 23:31:10 +00:00
nativefier/src/helpers/helpers.js

27 lines
446 B
JavaScript
Raw Normal View History

import os from 'os';
import axios from 'axios';
function isOSX() {
return os.platform() === 'darwin';
}
function isWindows() {
return os.platform() === 'win32';
}
function downloadFile(fileUrl) {
return axios.get(
fileUrl, {
responseType: 'arraybuffer'
})
.then(function(response) {
return response.data;
});
}
export default {
isOSX,
isWindows,
downloadFile
};