Socket
Socket
Sign inDemoInstall

@segment/analytics.js-core

Package Overview
Dependencies
Maintainers
140
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@segment/analytics.js-core - npm Package Compare versions

Comparing version 3.10.0 to 3.10.1

26

lib/analytics.js

@@ -19,3 +19,2 @@ 'use strict';

var Track = require('segmentio-facade').Track;
var after = require('@ndhoule/after');
var bindAll = require('bind-all');

@@ -190,7 +189,11 @@ var clone = require('@ndhoule/clone');

// make ready callback
var readyCallCount = 0;
var integrationCount = keys(integrations).length;
var ready = after(integrationCount, function() {
self._readied = true;
self.emit('ready');
});
var ready = function() {
readyCallCount++;
if (readyCallCount >= integrationCount) {
self._readied = true;
self.emit('ready');
}
};

@@ -205,2 +208,3 @@ // init if no integrations

this.failedInitializations = [];
var initialPageSkipped = false;
each(function(integration) {

@@ -211,6 +215,15 @@ if (

) {
integration.page = after(2, integration.page);
// We've assumed one initial pageview, so make sure we don't count the first page call.
var page = integration.page;
integration.page = function() {
if (initialPageSkipped) {
return page.apply(this, arguments);
}
initialPageSkipped = true;
return;
};
}
integration.analytics = self;
integration.once('ready', ready);

@@ -232,2 +245,3 @@ try {

// Mark integration as ready to prevent blocking of anyone listening to analytics.ready()
integration.ready();

@@ -234,0 +248,0 @@ }

{
"name": "@segment/analytics.js-core",
"author": "Segment <friends@segment.com>",
"version": "3.10.0",
"version": "3.10.1",
"description": "The hassle-free way to integrate analytics into any web application.",

@@ -32,3 +32,2 @@ "keywords": [

"dependencies": {
"@ndhoule/after": "^1.0.0",
"@ndhoule/clone": "^1.0.0",

@@ -35,0 +34,0 @@ "@ndhoule/defaults": "^2.0.1",

Sorry, the diff of this file is too big to display

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