🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@kingt/kt-tool

Package Overview
Dependencies
Maintainers
2
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kingt/kt-tool - npm Package Compare versions

Comparing version
1.7.3
to
1.7.4
+1
-1
package.json
{
"name": "@kingt/kt-tool",
"version": "1.7.3",
"version": "1.7.4",
"description": "初始化公共方法,引用测试,_kt_引入",

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

@@ -51,7 +51,11 @@ // export const tool = {

export const clearLS = () => {
Object.keys(localStorage).forEach((key) => {
if (key.startsWith('kt-int')) {
localStorage.removeItem(key)
}
})
try {
Object.keys(localStorage).forEach((key) => {
if (typeof key === 'string' && key.startsWith('kt-int')) {
localStorage.removeItem(key)
}
})
} catch (error) {
console.error('清除local存储失败:', error)
}
}

@@ -106,7 +110,11 @@ /**

export const clearSS = () => {
Object.keys(sessionStorage).forEach((key) => {
if (key.startsWith('kt-int')) {
sessionStorage.removeItem(key)
}
})
try {
Object.keys(sessionStorage).forEach((key) => {
if (typeof key === 'string' && key.startsWith('kt-int')) {
sessionStorage.removeItem(key)
}
})
} catch (error) {
console.error('清除session存储失败:', error)
}
}

@@ -113,0 +121,0 @@ /**