# LocalStorage **Repository Path**: yunfound/LocalStorage ## Basic Information - **Project Name**: LocalStorage - **Description**: Web localStorage that supports expiration time - **Primary Language**: JavaScript - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2018-03-21 - **Last Updated**: 2020-12-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # LocalStorage Web localStorage that supports expiration time, the API same as native localStorage. Usage: ##### ## LocalStorage.setItem(key,data,expired) > expired: the time to expired,unit of milliseconds. eg. expired=1000 * 10, means ten seconds later expires ##### ## LocalStorage.getItem(key) > return the data cached with **key** , if the data has expired, will return null ##### ## LocalStorage.removeItem(key) > remove the data cached with **key** ##### ## LocalStorage.keys() > return all keys cached via LocalStorage ##### ## LocalStorage.clear() > clear all data cached via LocalStorage welcome to discuss!