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

datastores

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

datastores

Abstractions and wrappers for datastores.

latest
Source
npmnpm
Version
0.0.1
Version published
Weekly downloads
6
Maintainers
1
Weekly downloads
 
Created
Source

Stuff

{
  JVR,
  MockKVR
} = require 'datastores'

Abstractions

KV

  • k is an arbitrary Buffer. If you pass a string, it will get UTF-8-encoded.
  • v is an arbitrary Buffer. If you pass a string, it will get UTF-8-encoded.
.set k, v,  (e) ->

.get k,     (e, v) ->p

KVR

KV plus:

.getRange {k__prefix:"foo/", max:50}, (e, items) ->
  for [k, v] in items
    ...

# TODO: implement this:
.getRangeEmitter {...}, (e, itemEmitter) ->
  itemEmitter.on 'item', (k, v) ->
  itemEmitter.on 'end', () ->
  # itemEmitter.pause
  # itemEmitter.resume
  # itemEmitter.destroy

{JV, JVR}

A wrapper around a {KV, KVR} store, keyjson-{en,de}oding the keys.

jv = new JV kv
jv.set [WIKIMEDIA, 'enwiki', articleId, revId], data, (e) ->
jv.getRange k__prefix:[WIKIMEDIA, 'enwiki', articleId], (e, items) ->

SQL

TODO

Engines

MockKVR

  • in-RAM
  • O(total-number-of-items) getRanges so far
kvr = new MockKVR

FAQs

Package last updated on 29 Sep 2011

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