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

@arms/rum-browser

Package Overview
Dependencies
Maintainers
5
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arms/rum-browser - npm Package Compare versions

Comparing version 0.0.18 to 0.0.19

3

lib/utils/uuid.d.ts

@@ -0,1 +1,4 @@

/**
* 获取uuid
*/
export declare function getUUID(prefix?: string): string;

@@ -2,0 +5,0 @@ /**

4

lib/utils/uuid.js

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

"use strict";exports.__esModule=!0,exports.getEventId=getEventId,exports.getSessionID=getSessionID,exports.getUUID=getUUID,exports.getUserID=getUserID,exports.getViewId=getViewId,exports.setSessionID=setSessionID;var _rumCore=require("@arms/rum-core"),_global=require("./global"),SESSION_ID="_arms_sid",SESSION_ID_EXP="_arms_sid_exp",USER_ID="_arms_uid",localStorage=_global.global.localStorage,UID_BASE=Date.now();// 存储sessionID的键名
"use strict";exports.__esModule=!0,exports.getEventId=getEventId,exports.getSessionID=getSessionID,exports.getUUID=getUUID,exports.getUserID=getUserID,exports.getViewId=getViewId,exports.setSessionID=setSessionID;var _rumCore=require("@arms/rum-core"),_global=require("./global"),SESSION_ID="_arms_sid",SESSION_ID_EXP="_arms_sid_exp",USER_ID="_arms_uid",localStorage=_global.global.localStorage;// 存储sessionID的键名
// 存储sessionID的过期id

@@ -8,3 +8,3 @@ // 存储userID的键名

* 获取唯一的sessionID
*/function getSessionID(){var a=localStorage.getItem(SESSION_ID),b=new Date(localStorage.getItem(SESSION_ID_EXP));return a&&b.valueOf()&&!(b<new Date)||(a=setSessionID()),a}/**
*/function getSessionID(){var a=localStorage.getItem(SESSION_ID),b=new Date(localStorage.getItem(SESSION_ID_EXP));return(!a||32>a.length||!b.valueOf()||b<new Date)&&(a=setSessionID()),a}/**
* 设置唯一的sessionID

@@ -11,0 +11,0 @@ */function setSessionID(){var a=(0,_rumCore.generateGUID)();return localStorage.setItem(SESSION_ID,a),localStorage.setItem(SESSION_ID_EXP,new Date(Date.now()+86400000).toString()),a}/**

{
"name": "@arms/rum-browser",
"version": "0.0.18",
"version": "0.0.19",
"description": "arms rum javascript sdk for browser",

@@ -5,0 +5,0 @@ "author": "guangli.fj <guangli.fj@alibaba-inc.com>",

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