Installation
How to install UniKVS and plugins for your runtime.
Install only the packages you need for your target backends and transformations.
Install the Core
unikvs is required. Backends and transformations are separate packages.
npm install unikvspnpm add unikvsyarn add unikvsbun add unikvsnub add unikvsaube add unikvsAdd Storages
Add the packages for the backends you use. Common combinations:
For tests and temporary storage. No external services needed.
npm install @unikvs/memorypnpm add @unikvs/memoryyarn add @unikvs/memorybun add @unikvs/memorynub add @unikvs/memoryaube add @unikvs/memoryStores data on the local filesystem in Node.js.
npm install @unikvs/fs.nodepnpm add @unikvs/fs.nodeyarn add @unikvs/fs.nodebun add @unikvs/fs.nodenub add @unikvs/fs.nodeaube add @unikvs/fs.nodeIn browsers, choose from OPFS, IndexedDB, Local Storage, and others.
npm install @unikvs/opfs @unikvs/indexeddb @unikvs/localstoragepnpm add @unikvs/opfs @unikvs/indexeddb @unikvs/localstorageyarn add @unikvs/opfs @unikvs/indexeddb @unikvs/localstoragebun add @unikvs/opfs @unikvs/indexeddb @unikvs/localstoragenub add @unikvs/opfs @unikvs/indexeddb @unikvs/localstorageaube add @unikvs/opfs @unikvs/indexeddb @unikvs/localstorageFor choosing a backend, see Storage Comparison. For details on each package, see the package reference.
Add Transformations
Add middleware only when you need value transformation.
npm install @unikvs/json @unikvs/compressionpnpm add @unikvs/json @unikvs/compressionyarn add @unikvs/json @unikvs/compressionbun add @unikvs/json @unikvs/compressionnub add @unikvs/json @unikvs/compressionaube add @unikvs/json @unikvs/compressionFor Validation
To validate input/output values with Valibot schemas, install valibot separately.
npm install valibotpnpm add valibotyarn add valibotbun add valibotnub add valibotaube add valibotPass schemas to the Builder schema option to enable validation. See Validating Values for the steps.
Version Notes
- Keep the core and plugin versions on the same release line where possible.
- If you see peer dependency warnings, install what the warning requests. For example, if a logging-related peer dependency is requested, follow the instructions to install it.