@sbp/okturtles.data

0.1.5 • Public • Published

okTurtles.data

Creates an in-memory key-value datastore for SBP.

Offers basic set/get/delete actions, and a more interesting /apply selector that can be used where normally an instance from OOP would be used.

See index.test.js for usage examples.

Install:

$ npm install --save @sbp/okturtles.data

Usage:

import sbp from '@sbp/sbp'
import '@sbp/okturtles.data'

// now you can use any of the okTurtles.data selectors
// note: you only need to import '@sbp/okturtles.data' once!

Registers the following selectors. Self-explanatory except for /apply:

  • 'okTurtles.data/get'
  • 'okTurtles.data/set'
  • 'okTurtles.data/delete'
  • 'okTurtles.data/add'
  • 'okTurtles.data/remove'
  • 'okTurtles.data/apply' - applies a function to the value of a given key.

History

See HISTORY.md.

License

MIT.

/@sbp/okturtles.data/

    Package Sidebar

    Install

    npm i @sbp/okturtles.data

    Weekly Downloads

    8

    Version

    0.1.5

    License

    MIT

    Unpacked Size

    9.39 kB

    Total Files

    11

    Last publish

    Collaborators

    • taoeffect