Skip to content
On this page

LocalStorage

setLocalStorage

🧿设置localStorage

typescript
/**
 * @func setLocalStorage
 * @param {string} key
 * @param {string} value
 * @returns {void}
 * @desc  设置localStorage
 * @example setLocalStorage('key', 'value');
 */

getLocalStorage

🧿获取localStorage

typescript
/**
 * @func getLocalStorage
 * @param {string} key
 * @returns {string}
 * @desc  获取localStorage
 * @example getLocalStorage('key');
 */

delLocalStorage

🧿删除localStorage

typescript
/**
 * @func delLocalStorage
 * @param {string} key
 * @returns {any}
 * @desc  获取localStorage
 * @example delLocalStorage('key');
 */

SessionStorage

setSessionStorage

🧿设置sessionStorage

typescript
/**
 * @func setSessionStorage
 * @param {string} key
 * @param {string} value
 * @returns {any}
 * @desc  设置sessionStorage
 * @example setSessionStorage('key', 'value');
 */

getSessionStorage

🧿获取sessionStorage

typescript
/**
 * @func getSessionStorage
 * @param {string} key
 * @returns {any}
 * @desc  获取sessionStorage
 * @example getSessionStorage('key');
 */

delSessionStorage

🧿删除sessionStorage

typescript
/**
 * @func delSessionStorage
 * @param {string} key
 * @returns {any}
 * @desc  删除sessionStorage
 * @example delSessionStorage('key');
 */

Released under the MIT License.