0.6.11 • Published 5 years ago

@rappopo/dab-memory v0.6.11

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

@rappopo/dab-memory

A Rappopo DAB implementation for in-memory datastore, powered by Lodash and lodash-query.

Installation

Simply invoke this command in your project folder:

$ npm install --save @rappopo/dab-memory

And within your script:

const DabMemory = require('@rappopo/dab-memory')
const dab = new DabMemory()
// prepare collections
dab.createCollection({ name: 'test' })
  .then(result => {
    return dab.bulkCreate(data, { collection: 'test' })
  })
...
// lets dab!
dab.findOne('my-doc', 'test').then(function(doc) { ... })

Options

Currently, no options necessary.

Features

Data is internally saved as collections as follows:

dab.data.<collection-name> = [
  { _id: "key1", name: "name1", ... },
  { _id: "key2", name: "name2", ... }
]

To enforce structured data throughout DAB and use features provided by collections, you need to createCollection () with your custom fields as explained here

Donation

  • Donate
  • Bitcoin 16HVCkdaNMvw3YdBYGHbtt3K5bmpRmH74Y

License

MIT

0.6.11

5 years ago

0.6.10

5 years ago

0.6.9

5 years ago

0.6.8

5 years ago

0.6.7

5 years ago

0.6.6

6 years ago

0.6.5

6 years ago

0.6.4

6 years ago

0.6.3

6 years ago

0.6.2

6 years ago

0.6.1

6 years ago

0.6.0

6 years ago

0.5.1

6 years ago

0.5.0

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago