Fix npm-test (xo code style)

This commit is contained in:
Jonathan Dahan
2016-08-15 00:14:14 -04:00
parent b666dbffe8
commit 19cb774cc2
9 changed files with 451 additions and 444 deletions

12
app/main/link-helper.js Normal file
View File

@@ -0,0 +1,12 @@
const wurl = require('wurl');
// Check link if it's internal/external
function linkIsInternal(currentUrl, newUrl) {
const currentDomain = wurl('domain', currentUrl);
const newDomain = wurl('domain', newUrl);
return currentDomain === newDomain;
}
exports = module.exports = {
linkIsInternal
};