{"id":49439,"library":"storage-memory","title":"storage-memory","description":"A lightweight in-memory storage library for JavaScript, version 0.0.2. Provides a simple key-value store with get/set/remove/clear operations, similar to localStorage but in memory. No server or persistence needed. Useful for testing, mocking, or temporary data. Minimal API with no dependencies.","status":"active","version":"0.0.2","language":"javascript","source_language":"en","source_url":"https://github.com/rt2zz/storage-memory","tags":["javascript"],"install":[{"cmd":"npm install storage-memory","lang":"bash","label":"npm"},{"cmd":"yarn add storage-memory","lang":"bash","label":"yarn"},{"cmd":"pnpm add storage-memory","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package exports a default class. No named exports.","wrong":"const StorageMemory = require('storage-memory')","symbol":"StorageMemory","correct":"import StorageMemory from 'storage-memory'"},{"note":"CommonJS users must access .default property.","wrong":"const StorageMemory = require('storage-memory')","symbol":"StorageMemory","correct":"const StorageMemory = require('storage-memory').default"}],"quickstart":{"code":"import StorageMemory from 'storage-memory';\n\nconst store = new StorageMemory();\nstore.setItem('key', 'value');\nconst value = store.getItem('key');\nconsole.log(value); // 'value'\nstore.removeItem('key');\nstore.clear();","lang":"javascript","description":"Basic usage: create an in-memory store, set, get, remove, and clear items."},"warnings":[{"fix":"Use a persistent storage solution like localStorage or IndexedDB for permanent data.","message":"Data is not persistent across page reloads or application restarts.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Implement custom expiration logic if needed.","message":"No built-in expiration or TTL for stored items.","severity":"gotcha","affected_versions":">=0.0.1"}],"env_vars":null,"search_vec":"'0.0.2':14 'api':44 'data':42 'depend':47 'get/set/remove/clear':23 'in-memori':6 'javascript':12,48 'key':19 'key-valu':18 'librari':10 'lightweight':5 'localstorag':27 'memori':3,8,30 'minim':43 'mock':39 'need':35 'oper':24 'persist':34 'provid':15 'server':32 'similar':25 'simpl':17 'storag':2,9 'storage-memori':1 'store':21 'temporari':41 'test':38 'use':36 'valu':20 'version':13","created_at":"2026-06-07T17:01:47.117921+00:00","updated_at":"2026-06-07T17:01:47.117921+00:00","problems":[{"fix":"Use: const StorageMemory = require('storage-memory').default;","cause":"Using require without .default in CommonJS.","error":"TypeError: StorageMemory is not a constructor"},{"fix":"Use import statement: import StorageMemory from 'storage-memory';","cause":"Using require in an ES module environment.","error":"ReferenceError: module is not defined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/rt2zz/storage-memory#readme","github":"https://github.com/rt2zz/storage-memory","docs":null,"changelog":null,"pypi":null,"npm":"storage-memory","openapi_spec":null,"status_page":null,"smithery":null,"categories":["storage"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}