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

@aller/blink

Package Overview
Dependencies
Maintainers
11
Versions
232
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aller/blink - npm Package Compare versions

Comparing version 8.26.3 to 8.27.0-alpha.0

2

lib/config/config.d.ts

@@ -1,2 +0,2 @@

export declare const VERSION = "8.26.3";
export declare const VERSION = "8.27.1";
/**

@@ -3,0 +3,0 @@ * The minimum waiting time between each sending of active time events

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ACTIVE_TIME_INITIAL_MOBILE = exports.ACTIVE_TIME_WAIT = exports.VERSION = void 0;
exports.VERSION = '8.26.3';
exports.VERSION = '8.27.1';
/**

@@ -6,0 +6,0 @@ * The minimum waiting time between each sending of active time events

@@ -7,5 +7,21 @@ "use strict";

var external_id_1 = __importDefault(require("@aller/external-id"));
function stripQueryParams(url) {
var urlObj = new URL(url);
urlObj.search = '';
return urlObj.toString();
}
var urlParamStripWhitelist = ['annonsorinnhold'];
var whitelistedStripQueryParams = function (whitelist) {
return function (url) {
var urlParts = url.split(/[./]+/);
if (urlParamStripWhitelist.some(function (word) { return urlParts.includes(word); }) === false) {
return url;
}
return stripQueryParams(url);
};
};
var stripWithWhitelist = whitelistedStripQueryParams(urlParamStripWhitelist);
function getIdFromUrl(url, fallbackId) {
try {
return external_id_1.default(url);
return external_id_1.default(stripWithWhitelist(url));
}

@@ -12,0 +28,0 @@ catch (e) {

{
"name": "@aller/blink",
"version": "8.26.3",
"version": "8.27.0-alpha.0",
"description": "A library for tracking user behaviour.",

@@ -69,3 +69,3 @@ "main": "lib/main.js",

},
"gitHead": "fce883596d6c018b730765c3da11a1585f49a12f"
"gitHead": "fb3565ab6547004148957f534afabe2ac50e4f05"
}

@@ -1,2 +0,2 @@

export const VERSION = '8.26.3';
export const VERSION = '8.27.1';

@@ -3,0 +3,0 @@ /**

import getExternalId from '@aller/external-id';
function stripQueryParams(url: string): string {
const urlObj = new URL(url);
urlObj.search = '';
return urlObj.toString();
}
const urlParamStripWhitelist = ['annonsorinnhold'];
const whitelistedStripQueryParams =
(whitelist: string[]) =>
(url: string): string => {
const urlParts = url.split(/[./]+/);
if (
urlParamStripWhitelist.some(word => urlParts.includes(word)) === false
) {
return url;
}
return stripQueryParams(url);
};
const stripWithWhitelist = whitelistedStripQueryParams(urlParamStripWhitelist);
export default function getIdFromUrl(

@@ -8,3 +30,3 @@ url: string,

try {
return getExternalId(url);
return getExternalId(stripWithWhitelist(url));
} catch (e) {

@@ -11,0 +33,0 @@ return fallbackId;

Sorry, the diff of this file is not supported yet

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