@arms/rum-browser
Advanced tools
Comparing version 0.0.18 to 0.0.19
@@ -0,1 +1,4 @@ | ||
/** | ||
* 获取uuid | ||
*/ | ||
export declare function getUUID(prefix?: string): string; | ||
@@ -2,0 +5,0 @@ /** |
@@ -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>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37631
423