# easyLocalStroe **Repository Path**: ereddate2017/easy-local-stroe ## Basic Information - **Project Name**: easyLocalStroe - **Description**: 前端本地存储工具 - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-03-28 - **Last Updated**: 2022-03-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # easyLocalStroe #### 介绍 前端本地存储工具 #### 使用说明 ``` const localStore = new LocalStore(); localStore .createInstance({ name: "testStore", store: { type: "LOCALSTORAGE", state: { token: "111111", }, }, }) .then((target) => { target.setDriver("COOKIE").then((target) => { target.driver().then((res) => console.log(res)); target.setItem("test", 12345).then((target) => { target.getItem("test").then((res) => console.log(res)); target.getItem("token").then((res) => console.log(res)); target.setDriver("SESSIONSTORAGE").then((target) => { target.driver().then((res) => console.log(res)); target.getItem("test").then((res) => console.log(res)); target.getItem("token").then((res) => console.log(res)); target.keys().then((res) => console.log(res)); target.instances().then((res) => console.log(res)); }); }); }); }); ```