Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aller/site-id

Package Overview
Dependencies
Maintainers
20
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aller/site-id - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

2

lib/index.js

@@ -68,5 +68,5 @@ "use strict";

function isExternalUrl(url) {
return hosts.some(function (e) {
return !hosts.some(function (e) {
return url.includes(e);
});
}
{
"name": "@aller/site-id",
"version": "2.1.0",
"version": "2.1.1",
"description": "Site ID to host and vice versa",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -39,3 +39,3 @@ const siteIdsObject = {

function isExternalUrl(url) {
return hosts.some(e => url.includes(e));
return !hosts.some(e => url.includes(e));
}

@@ -42,0 +42,0 @@

@@ -18,9 +18,9 @@ import test from 'ava';

test('Should be external sites', (t) => {
t.false(isExternalUrl('https://www.nrk.no/norge/hauglie-til-stortinget_-_-alt-skal-fram-i-lyset-1.14768334'));
t.false(isExternalUrl('https://www.tv2.no/spesialer/asted-norge/kapittel-8-babyen-i-containeren'));
t.true(isExternalUrl('https://www.nrk.no/norge/hauglie-til-stortinget_-_-alt-skal-fram-i-lyset-1.14768334'));
t.true(isExternalUrl('https://www.tv2.no/spesialer/asted-norge/kapittel-8-babyen-i-containeren'));
});
test('Should not be external sites', (t) => {
t.true(isExternalUrl('https://www.elbil24.no/nyheter/et-skritt-naermere-smartlading/71154774'));
t.true(isExternalUrl('https://www.dagbladet.no/nyheter/sjekk-din-kommune/71783428'));
t.false(isExternalUrl('https://www.elbil24.no/nyheter/et-skritt-naermere-smartlading/71154774'));
t.false(isExternalUrl('https://www.dagbladet.no/nyheter/sjekk-din-kommune/71783428'));
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc