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 user preferences dashboard that displays and manages multiple user settings stored in browser storage.
Create a system that stores user preferences as key-value pairs and provides functionality to display all preferences in a formatted list. The system should support adding, viewing, and clearing preferences.
The system must store user preferences with the following structure:
Implement a function that generates a formatted display of all stored preferences:
Implement functionality to collect all preferences into a structured format suitable for export or display in a UI.
@generates
/**
* Stores a user preference with the given key and value
* @param {string} key - The preference name
* @param {*} value - The preference value (any serializable type)
*/
function setPreference(key, value) {
// IMPLEMENTATION HERE
}
/**
* Retrieves all stored preferences as an object
* @returns {Object} An object containing all key-value pairs of preferences
*/
function getAllPreferences() {
// IMPLEMENTATION HERE
}
/**
* Generates a formatted string displaying all preferences
* @returns {string} A formatted string with each preference on a new line
*/
function displayPreferences() {
// IMPLEMENTATION HERE
}
/**
* Clears all stored preferences
*/
function clearAllPreferences() {
// IMPLEMENTATION HERE
}
module.exports = {
setPreference,
getAllPreferences,
displayPreferences,
clearAllPreferences
};Provides cross-browser local storage functionality with automatic serialization.
@satisfied-by