New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@soketi/brain

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@soketi/brain

`@soketi/brain` is an abstraction package that handles the caching of data in memory.

latest
npmnpm
Version
0.1.4
Version published
Maintainers
1
Created
Source

@soketi/brain

@soketi/brain is an abstraction package that handles the caching of data in memory.

Usage

import { LocalBrain } from '@soketi/brain';

const brain = new LocalBrain();

await brain.set('key', 'value');
await brain.get('key');

Brains

We are planning to support multiple types of brains.

  • LocalBrain - stores data in memory, in the same process; it's not shared between processes
  • RedisBrain - stores data in Redis
  • MemcachedBrain - stores data in Memcached
  • MongoBrain - stores data in MongoDB
  • SqlBrain - stores data in a SQL database, using Knex

Custom Brains

You can create your own brain by implementing the Brain interface:

import { Brain } from '@soketi/brain';

class MyBrain implements Brain {
  // ...
}

const brain = new MyBrain();

Development

This library was generated with Nx.

Building

Run nx build brain to build the library.

Running unit tests

Run nx test brain to execute the unit tests via Vitest.

FAQs

Package last updated on 31 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