{"id":49307,"library":"seneca-mem-store","title":"seneca-mem-store","description":"An in-memory data storage plugin for the Seneca.js microservices toolkit. It provides a non-persistent storage engine implementing the Seneca entity API for early development and unit testing. Version 9.4.0 is the current stable release, compatible with Seneca 3.x and 4.x. It is loaded by default and requires the seneca-entity and seneca-basic plugins. Differentiators include zero configuration, simple setup, and full support for the Seneca query specification (filtering, sorting, pagination). Ideal for prototyping and testing scenarios where data persistence is not needed.","status":"active","version":"9.4.0","language":"javascript","source_language":"en","source_url":"https://github.com/senecajs/seneca-mem-store","tags":["javascript","seneca","plugin","store","mem","memory","typescript"],"install":[{"cmd":"npm install seneca-mem-store","lang":"bash","label":"npm"},{"cmd":"yarn add seneca-mem-store","lang":"bash","label":"yarn"},{"cmd":"pnpm add seneca-mem-store","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core Seneca framework required to use the plugin.","package":"seneca","optional":false},{"reason":"Provides the ActiveRecord-style data storage API that this plugin implements.","package":"seneca-entity","optional":false}],"imports":[{"note":"This is a plugin, not a standalone module.","wrong":"const Seneca = require('seneca-mem-store');","symbol":"default","correct":"const Seneca = require('seneca'); const seneca = Seneca(); seneca.use('mem-store');"},{"note":"TypeScript types are shipped, but usage is through Seneca instance.","wrong":"import senecaMemStore from 'seneca-mem-store';","symbol":"TypeScript types","correct":"import Seneca from 'seneca'; const seneca = Seneca(); seneca.use('mem-store');"},{"note":"The plugin is auto-loaded if you use seneca-entity; explicit use() is optional.","wrong":"seneca.use(require('seneca-mem-store'))","symbol":"Plugin registration","correct":"seneca.use('mem-store')"}],"quickstart":{"code":"const Seneca = require('seneca');\nconst seneca = Seneca();\nseneca.use('basic').use('entity');\n// mem-store is loaded by default, no explicit use() needed.\nseneca.ready(() => {\n  const apple = seneca.make$('fruit');\n  apple.name = 'Pink Lady';\n  apple.price = 0.99;\n  apple.save$((err, saved) => {\n    console.log('Saved with id:', saved.id);\n    // load it back\n    seneca.make$('fruit').load$({ id: saved.id }, (err2, loaded) => {\n      console.log('Loaded:', loaded.name);\n    });\n  });\n});","lang":"javascript","description":"Demonstrates creating an entity, saving it to the in-memory store, and loading it back by id."},"warnings":[{"fix":"Use import syntax or upgrade to Node.js 14+ with --experimental-modules flag (deprecated) or use dynamic import.","message":"In version 9.x, the plugin is ESM-only. Any require() will fail on Node.js versions that don't support ESM fully.","severity":"breaking","affected_versions":">=9.0.0"},{"fix":"Ensure you are using Seneca 3.x or 4.x with compatible API.","message":"Seneca 4.x version requires changes in plugin registration (use('mem-store') instead of older patterns).","severity":"breaking","affected_versions":">=9.0.0 && <10.0.0"},{"fix":"Upgrade to Seneca 3.x or higher.","message":"The older Seneca 2.x support was dropped after version 8.x.","severity":"deprecated","affected_versions":">=9.0.0"},{"fix":"Use a persistent store plugin like seneca-postgres-store for production.","message":"Data does not persist between runs. Do not use for production data.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'3':46 '4':49 '9.4.0':37 'api':29 'basic':65 'compat':43 'configur':70 'current':40 'data':9,91 'default':55 'develop':32 'differenti':67 'earli':31 'engin':24 'entiti':28,61 'filter':81 'full':74 'ideal':84 'implement':25 'in-memori':6 'includ':68 'javascript':96 'load':53 'mem':3,100 'memori':8,101 'microservic':15 'need':95 'non':21 'non-persist':20 'pagin':83 'persist':22,92 'plugin':11,66,98 'prototyp':86 'provid':18 'queri':79 'releas':42 'requir':57 'scenario':89 'seneca':2,27,45,60,64,78,97 'seneca-bas':63 'seneca-ent':59 'seneca-mem-stor':1 'seneca.js':14 'setup':72 'simpl':71 'sort':82 'specif':80 'stabl':41 'storag':10,23 'store':4,99 'support':75 'test':35,88 'toolkit':16 'typescript':102 'unit':34 'version':36 'x':47,50 'zero':69","created_at":"2026-06-07T17:01:06.062340+00:00","updated_at":"2026-06-07T17:01:06.062340+00:00","problems":[{"fix":"Install seneca and seneca-mem-store, then use seneca.use('mem-store').","cause":"Trying to require the plugin directly as a standalone module.","error":"Error: Cannot find module 'seneca-mem-store'"},{"fix":"Add seneca.use('entity') after basic plugin.","cause":"Missing the seneca-entity plugin.","error":"TypeError: seneca.make$ is not a function"},{"fix":"Run npm install seneca-mem-store and add seneca.use('mem-store').","cause":"mem-store not installed or not registered via use().","error":"Error: Plugin mem-store not found"}],"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/senecajs/seneca-mem-store#readme","github":"https://github.com/senecajs/seneca-mem-store","docs":null,"changelog":null,"pypi":null,"npm":"seneca-mem-store","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"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}}