@creately/rxdata-es6
TypeScript icon, indicating that this package has built-in type declarations

5.1.3 • Public • Published

RxData

RxData is a schemaless reactive document database for web browsers. It is inspired by rxdb but uses localForage instead of pouchdb to store data.

Getting Started

Install @creately/rxdata module from npm.

npm install @creately/rxdata

Create a new database. Also create some collections to group similar data.

import { Database } from '@creately/rxdata'

const db = new Database('test-db')
const vehicles = db.collection('vehicles')

Query documents in a collection and subscribe to changes in result data.

vehicles
  .find({ tires: { $gte: 4 } })
  .subscribe(data => console.log('data:', data))

Use collection methods to query, insert, modify or remove documents.

await vehicles.insert({
  id: 'todo-1',
  title: 'write database module',
})

await vehicles.update(
  { id: 'todo-1' },
  { $set: { completed: true }},
)

await vehicles.remove(
  { id: 'todo-1' },
)

Dependencies (8)

Dev Dependencies (13)

Package Sidebar

Install

npm i @creately/rxdata-es6

Weekly Downloads

0

Version

5.1.3

License

MIT

Unpacked Size

56.1 kB

Total Files

19

Last publish

Collaborators

  • mehdhi
  • thisunravisara
  • chandika
  • shashik_thiwanka
  • sasindu
  • sajeeva
  • linatrefai
  • damithcgx