Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/wincloud_gateway/node_modules/react-query/es/createLocalStoragePersistor-experimental/ drwxr-xr-x | |
| Viewing file: Select action/file-type: import { noop } from '../core/utils';
export function createLocalStoragePersistor(_temp) {
var _ref = _temp === void 0 ? {} : _temp,
_ref$localStorageKey = _ref.localStorageKey,
localStorageKey = _ref$localStorageKey === void 0 ? "REACT_QUERY_OFFLINE_CACHE" : _ref$localStorageKey,
_ref$throttleTime = _ref.throttleTime,
throttleTime = _ref$throttleTime === void 0 ? 1000 : _ref$throttleTime;
if (typeof localStorage !== 'undefined') {
return {
persistClient: throttle(function (persistedClient) {
localStorage.setItem(localStorageKey, JSON.stringify(persistedClient));
}, throttleTime),
restoreClient: function restoreClient() {
var cacheString = localStorage.getItem(localStorageKey);
if (!cacheString) {
return;
}
return JSON.parse(cacheString);
},
removeClient: function removeClient() {
localStorage.removeItem(localStorageKey);
}
};
}
return {
persistClient: noop,
restoreClient: noop,
removeClient: noop
};
}
function throttle(func, wait) {
if (wait === void 0) {
wait = 100;
}
var timer = null;
return function () {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
if (timer === null) {
timer = setTimeout(function () {
func.apply(void 0, args);
timer = null;
}, wait);
}
};
} |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.005 ]-- |