# superstore **Repository Path**: mirrors_kornelski/superstore ## Basic Information - **Project Name**: superstore - **Description**: localStorage, without the bugs, and with an asynchronous api. - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-25 - **Last Updated**: 2026-02-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # superstore [![Build Status](https://travis-ci.org/matthew-andrews/superstore.png?branch=master)](https://travis-ci.org/matthew-andrews/superstore) Superstore is a simple lightweight asynchronous wrapper around localStorage. Its features include: - It is [resilient to iOS's strange behaviour in private browsing mode](http://stackoverflow.com/questions/14555347/html5-localstorage-doesnt-works-in-ios-safari-private-browsing). - By making use of [setImmediate](https://github.com/NobleJS/setImmediate) its callbacks are truly asynchronous whilst still being cross-browser and performant (compared with `setTimeout(function() {}, 0)` [which introduces a delay of *at least* 10ms](https://developer.mozilla.org/en-US/docs/Web/API/window.setTimeout#Minimum.2F_maximum_delay_and_timeout_nesting)). - It accepts objects as values and runs `JSON.stringify` on **#set** and `JSON.parse` on **#get** for you. ## installation ``` npm install superstore ``` ## api Superstore is an uninstantiable module. Its methods are: ### #get(key, callback) ### #set(key, value, callback) ### #unset(key, callback) ### #clear(callback) ## todo - JSDoc comments and automatically generating documentation. - Should clear and unset be merged? - Split superstore-sync into its own git repository - Split the tests up into those that test the async layer and those that test the localStorage layer. (The point above is a dependency)