Socket
Book a DemoInstallSign in
Socket

@creately/rxdata

Package Overview
Dependencies
Maintainers
8
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@creately/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.

latest
npmnpm
Version
7.0.4-beta
Version published
Maintainers
8
Created
Source

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' },
)

Keywords

rxjs

FAQs

Package last updated on 04 Dec 2023

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