create-api-hooks
Advanced tools
Comparing version 0.0.47 to 0.0.48
@@ -11,14 +11,8 @@ import { useEffect, useState, useCallback, useRef } from 'react'; | ||
// @ts-ignore | ||
if (!localStorage && wx.getStorageSync) { | ||
// @ts-ignore | ||
localStorage = wx.getStorageSync; | ||
} | ||
var sessionStorage = global.sessionStorage || { | ||
setItem: function (name, value) { return (cacheObj[name] = value); }, | ||
getItem: function (name) { return cacheObj[name]; } | ||
}; | ||
// @ts-ignore | ||
if (!sessionStorage) { | ||
// @ts-ignore | ||
sessionStorage = { | ||
setItem: function (name, value) { return (cacheObj[name] = value); }, | ||
getItem: function (name) { return cacheObj[name]; } | ||
}; | ||
} | ||
var localStorage = global.localStorage || process.env.REMAX_PLATFORM === 'wecaht' ? wx.getStorageSync : process.env.REMAX_PLATFORM === 'ali' ? my.getStorageSync : sessionStorage; | ||
var localStore = { | ||
@@ -25,0 +19,0 @@ setItem: function (name, value) { |
@@ -15,14 +15,8 @@ 'use strict'; | ||
// @ts-ignore | ||
if (!localStorage && wx.getStorageSync) { | ||
// @ts-ignore | ||
localStorage = wx.getStorageSync; | ||
} | ||
var sessionStorage = global.sessionStorage || { | ||
setItem: function (name, value) { return (cacheObj[name] = value); }, | ||
getItem: function (name) { return cacheObj[name]; } | ||
}; | ||
// @ts-ignore | ||
if (!sessionStorage) { | ||
// @ts-ignore | ||
sessionStorage = { | ||
setItem: function (name, value) { return (cacheObj[name] = value); }, | ||
getItem: function (name) { return cacheObj[name]; } | ||
}; | ||
} | ||
var localStorage = global.localStorage || process.env.REMAX_PLATFORM === 'wecaht' ? wx.getStorageSync : process.env.REMAX_PLATFORM === 'ali' ? my.getStorageSync : sessionStorage; | ||
var localStore = { | ||
@@ -29,0 +23,0 @@ setItem: function (name, value) { |
{ | ||
"name": "create-api-hooks", | ||
"version": "0.0.47", | ||
"version": "0.0.48", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "author": "mushan0x0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
45958
380
5