3.1.0 • Published 7 years ago

reduxdb v3.1.0

Weekly downloads
113
License
-
Repository
github
Last release
7 years ago

reduxdb npm.io npm.io

Redux with MongoDB-like API.

Notice that NOT all the features of MongoDB are implemented here, such as multi-index and query operators.

The purpose of reduxdb is to avoid writing almost the same actions and stores again and again in different projects.

Installation

npm install --save reduxdb

Usage

var reduxdb = require("reduxdb")

var db = reduxdb.use("test")
db.createCollection("users", {index: "id"})
db.createCollection("teams", {index: "id"})
db.createCollection("books")    // using default index `_id`

db.subscribe(function() {
    console.log(db.stats())
    console.log(db.users.stats())
    console.log(db.teams.stats())
    console.log(db.books.stats())
})

db.users.insert({id: "1234", name: "wizawu"})
db.users.findOne({name: "wizawu"}).id    // 1234

API

reduxdb

  • use(name)

reduxdb.DB

reduxdb.Collection

3.1.0

7 years ago

3.0.4

7 years ago

3.0.3

7 years ago

3.0.2

7 years ago

3.0.1

7 years ago

3.0.0

7 years ago

2.1.3

7 years ago

2.1.2

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

2.0.0

7 years ago

1.4.0

7 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago

0.2.0

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago