create-api-hooks
Advanced tools
Comparing version 0.0.42 to 0.0.43
@@ -11,11 +11,14 @@ import { useEffect, useState, useCallback, useRef } from 'react'; | ||
// @ts-ignore | ||
localStorage = localStorage || wx.getStorageSync || { | ||
getItem: function () { }, | ||
setItem: function () { } | ||
}; | ||
if (!localStorage && wx.getStorageSync) { | ||
// @ts-ignore | ||
localStorage = wx.getStorageSync; | ||
} | ||
// @ts-ignore | ||
sessionStorage = sessionStorage || wx.getStorageSync || { | ||
getItem: function () { }, | ||
setItem: function () { } | ||
}; | ||
if (!sessionStorage) { | ||
// @ts-ignore | ||
sessionStorage = { | ||
setItem: function (name, value) { return (cacheObj[name] = value); }, | ||
getItem: function (name) { return cacheObj[name]; } | ||
}; | ||
} | ||
function createApiHooks(request) { | ||
@@ -22,0 +25,0 @@ var getRequestString = function (params) { |
@@ -15,11 +15,14 @@ 'use strict'; | ||
// @ts-ignore | ||
localStorage = localStorage || wx.getStorageSync || { | ||
getItem: function () { }, | ||
setItem: function () { } | ||
}; | ||
if (!localStorage && wx.getStorageSync) { | ||
// @ts-ignore | ||
localStorage = wx.getStorageSync; | ||
} | ||
// @ts-ignore | ||
sessionStorage = sessionStorage || wx.getStorageSync || { | ||
getItem: function () { }, | ||
setItem: function () { } | ||
}; | ||
if (!sessionStorage) { | ||
// @ts-ignore | ||
sessionStorage = { | ||
setItem: function (name, value) { return (cacheObj[name] = value); }, | ||
getItem: function (name) { return cacheObj[name]; } | ||
}; | ||
} | ||
function createApiHooks(request) { | ||
@@ -26,0 +29,0 @@ var getRequestString = function (params) { |
{ | ||
"name": "create-api-hooks", | ||
"version": "0.0.42", | ||
"version": "0.0.43", | ||
"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
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
42285
356