1.6.0 • Published 2 months ago

@signaldb/core v1.6.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

SignalDB

SignalDB is a client-side database optimized for modern web applications. It provides an optimistic UI for creating responsive and dynamic interfaces, a MongoDB-like interface for familiarity, and robust TypeScript support to ensure type safety and accelerate development. SignalDB enables versatile local data persistence with support for various storage providers and facilitates real-time updates by gathering and synchronizing data from multiple sources. Its framework-agnostic design makes it suitable for projects of any scale, offering instant data access with minimal latency, which is ideal for applications requiring fast data handling and real-time interactions. Adapters are available for popular reactive libraries, including Angular, React, Solid, Svelte and Vue.js.

Installation

  $ npm install @signaldb/core

Usage

import { Collection } from '@signaldb/core'

const Posts = new Collection()
const postId = Posts.insert({ title: 'Foo', text: 'Lorem ipsum …' })

Posts.updateOne({ id: postId }, { // updates the post
  $set: {
    title: 'New title',
  }
})

Posts.removeOne({ id: postId }) // removes the post

const cursor = collection.find({})

// returns an array with all documents in the collection
// reruns automatically in a reactive context
console.log(cursor.fetch())

See the documentation for more information.

License

Licensed under MIT license. Copyright (c) 2024 Max Nowack

Contributions

Contributions are welcome. Please open issues and/or file Pull Requests. See Contributing.md to get started.

Troubleshooting

If you encounter any issues, there are several ways to get support.

1.6.0

2 months ago

1.5.4

3 months ago

1.5.3

3 months ago

1.5.2

3 months ago

1.5.1

4 months ago

1.5.0

4 months ago

1.4.0

4 months ago

1.3.1

5 months ago

1.3.0

5 months ago

1.2.4

5 months ago

1.2.3

5 months ago

1.2.2

5 months ago

1.2.1

6 months ago

1.2.0

6 months ago

1.1.0

6 months ago

1.0.0

7 months ago