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

@aller/blink-labrador

Package Overview
Dependencies
Maintainers
16
Versions
287
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aller/blink-labrador - npm Package Compare versions

Comparing version 0.6.3 to 0.6.4

10

lib/main.js

@@ -89,4 +89,2 @@ 'use strict';

var _configureSender2 = _interopRequireDefault(_configureSender);
var _articlePreview = require('./utils/article-preview');

@@ -118,8 +116,4 @@

(0, _configureSender2.default)({
sendInterval: 10000,
batchLimit: 3,
batchInterval: 3000,
sendUrl: 'https://aas.medialaben.no/a/'
});
var senderConfigurationParameters = (0, _configureSender.getSenderConfigurationParameters)();
(0, _configureSender.configureSender)(senderConfigurationParameters);
this.pageView = (0, _uuid2.default)('pageView');

@@ -126,0 +120,0 @@ this.activeTimeTimerId = 0;

38

lib/sender/configure-sender.js

@@ -6,4 +6,9 @@ 'use strict';

});
exports.default = configureSender;
exports.configureSender = configureSender;
exports.getSenderConfigurationParameters = getSenderConfigurationParameters;
var _includes = require('lodash/includes');
var _includes2 = _interopRequireDefault(_includes);
var _visibilitychange = require('../triggers/visibilitychange');

@@ -56,7 +61,9 @@

// Configure batching
setInterval(function () {
if (_sender2.default.pendingEvents.length > batchLimit) {
_sender2.default.sendAllNow('BATCH');
}
}, batchInterval);
if (batchInterval) {
setInterval(function () {
if (_sender2.default.pendingEvents.length > batchLimit) {
_sender2.default.sendAllNow('BATCH');
}
}, batchInterval);
}

@@ -86,2 +93,21 @@ // Configure normal send interval

});
}
function getSenderConfigurationParameters() {
var userAgent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : navigator.userAgent;
if ((0, _includes2.default)(userAgent, '_app_')) {
return {
sendInterval: 2000,
batchLimit: 0,
batchInterval: 0,
sendUrl: 'https://aas.medialaben.no/a/'
};
}
return {
sendInterval: 10000,
batchLimit: 3,
batchInterval: 3000,
sendUrl: 'https://aas.medialaben.no/a/'
};
}
{
"name": "@aller/blink-labrador",
"version": "0.6.3",
"version": "0.6.4",
"description": "Library for using blink on Labrador",

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

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