tessl install tessl/npm-store@2.0.0A localStorage wrapper for all browsers without using cookies or flash, providing persistent client-side storage with automatic fallback and plugin architecture
Agent Success
Agent success rate when using this tile
75%
Improvement
Agent success rate improvement when using this tile compared to baseline
0.96x
Baseline
Agent success rate without this tile
78%
Build a browser storage utility that works across different browsers and environments, including older browsers and privacy modes where standard storage may not be available.
Your utility should provide persistent key-value storage that:
The utility should attempt to use storage mechanisms in this order:
@generates
/**
* Stores a value under the given key
* @param {string} key - The storage key
* @param {any} value - The value to store (will be serialized)
*/
export function set(key, value);
/**
* Retrieves a value by key
* @param {string} key - The storage key
* @returns {any} The stored value, or undefined if not found
*/
export function get(key);
/**
* Checks if persistent storage is available
* @returns {boolean} true if persistent storage is working, false if using in-memory fallback
*/
export function isAvailable();Provides cross-browser local storage support.