Nativefier/app/src/helpers/helpers.js

18 lines
343 B
JavaScript
Raw Normal View History

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