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

28 lines
497 B
JavaScript
Raw Normal View History

2016-01-29 14:04:41 +00:00
import wurl from 'wurl';
import os from 'os';
function isOSX() {
return os.platform() === 'darwin';
}
function isLinux() {
return os.platform() === 'linux';
}
function isWindows() {
return os.platform() === 'win32';
}
function linkIsInternal(currentUrl, newUrl) {
var currentDomain = wurl('domain', currentUrl);
var newDomain = wurl('domain', newUrl);
return currentDomain === newDomain;
}
2016-01-29 14:04:41 +00:00
export default {
isOSX,
isLinux,
isWindows,
2016-01-29 14:04:41 +00:00
linkIsInternal
};