Socket
Socket
Sign inDemoInstall

@mparticle/web-sdk

Package Overview
Dependencies
Maintainers
10
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mparticle/web-sdk - npm Package Compare versions

Comparing version 2.26.6 to 2.26.7

src/type-utils.ts

2

package.json
{
"name": "@mparticle/web-sdk",
"version": "2.26.6",
"version": "2.26.7",
"description": "mParticle core SDK for web applications",

@@ -5,0 +5,0 @@ "license": "Apache-2.0",

@@ -28,2 +28,3 @@ import { Batch } from '@mparticle/event-models';

isObject,
moveElementToEnd,
parseNumber,

@@ -190,2 +191,3 @@ returnConvertedBoolean,

addMpidToSessionHistory?(mpid: MPID, previousMpid?: MPID): void;
hasInvalidIdentifyRequest?: () => boolean;

@@ -499,2 +501,18 @@ nullifySession?: () => void;

this.addMpidToSessionHistory = (mpid: MPID, previousMPID?: MPID): void => {
const indexOfMPID = this.currentSessionMPIDs.indexOf(mpid);
if (mpid && previousMPID !== mpid && indexOfMPID < 0) {
this.currentSessionMPIDs.push(mpid);
return;
}
if (indexOfMPID >= 0) {
this.currentSessionMPIDs = moveElementToEnd(
this.currentSessionMPIDs,
indexOfMPID
);
}
};
this.getFirstSeenTime = (mpid: MPID) => {

@@ -501,0 +519,0 @@ if (!mpid) {

@@ -0,1 +1,3 @@

import { getIdentityName } from './type-utils';
var MessageType = {

@@ -212,46 +214,3 @@ SessionStart: 1,

IdentityType.getIdentityName = function(identityType) {
switch (identityType) {
case IdentityType.Other:
return 'other';
case IdentityType.CustomerId:
return 'customerid';
case IdentityType.Facebook:
return 'facebook';
case IdentityType.Twitter:
return 'twitter';
case IdentityType.Google:
return 'google';
case IdentityType.Microsoft:
return 'microsoft';
case IdentityType.Yahoo:
return 'yahoo';
case IdentityType.Email:
return 'email';
case IdentityType.FacebookCustomAudienceId:
return 'facebookcustomaudienceid';
case IdentityType.Other2:
return 'other2';
case IdentityType.Other3:
return 'other3';
case IdentityType.Other4:
return 'other4';
case IdentityType.Other5:
return 'other5';
case IdentityType.Other6:
return 'other6';
case IdentityType.Other7:
return 'other7';
case IdentityType.Other8:
return 'other8';
case IdentityType.Other9:
return 'other9';
case IdentityType.Other10:
return 'other10';
case IdentityType.MobileNumber:
return 'mobile_number';
case IdentityType.PhoneNumber2:
return 'phone_number_2';
case IdentityType.PhoneNumber3:
return 'phone_number_3';
}
return getIdentityName(identityType);
};

@@ -258,0 +217,0 @@

@@ -232,2 +232,5 @@ import Constants from './constants';

const moveElementToEnd = <T>(array: T[], index: number): T[] =>
array.slice(0, index).concat(array.slice(index + 1), array[index]);
export {

@@ -262,2 +265,3 @@ createCookieString,

mergeObjects,
moveElementToEnd,
};

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

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

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

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