Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

keyv-nats

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

keyv-nats

NATS storage adapter for Keyv

  • 0.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

keyv-nats

NATS storage adapter for the awesome keyv.

build codecov GitHub license npm

Installation

yarn add keyv keyv-nats

Usage

import Keyv from 'keyv'
import KeyvNats from 'keyv-nats'

const keyvNats = new KeyvNats({ servers: "localhost:4222" });
await keyvNats.connect();
const keyv = new Keyv({ store: keyvNats })

const key = 'foo'
const value = 'bar'

await keyv.set(key, value)

await keyv.get(key)

keyvNats.disconnect();

Tests

NATS Keyv storage adapter uses Testcontainers for NodeJS in order to run NATS server during test automation. Please check general Docker requirements of Testcontainers to run those in your local docker environment.

# nothing else required as testcontainer will start and stop nats
yarn test

Keywords

FAQs

Package last updated on 30 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc