npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nosqlprovider

v0.6.23

Published

A cross-browser/platform indexeddb-like client library

Downloads

43

Readme

NoSQLProvider Build Status

We developed NoSQLProvider after needing a simplified interface to NoSQL-style object storage/retrieval that worked not only across all browsers, but also for native app development (initially Cordova-based, later moving to React Native.) Across the browsers, this required unifying WebSQL and IndexedDB, with the nuances of all the different IndexedDB issues (on IE, mostly, with not properly supporting compound keys and multi-entry indexes, and Safari having basically completely broken keyspace support.) On native platforms and NodeJS, we fully wrap several different SQLite-based providers, depending on the platform. We also have built a fully in-memory database provider that has no persistence but supports fully transactional semantics, for a fallback in situations where you don't want persistence (ephemeral logins, etc.)

As part of this work, we had to develop SyncTasks as a complete promise library that spurns the A+ convention of deferring all resolutions/rejections to the event loop. This is because IndexedDB's transactional semantics are such that if control is ever returned to the event loop without a pending query, the transaction is automatically closed. As such, if you defer resolution of a query, then the transaction closes before you can issue followup queries against it. To avoid this, we required synchronous resolution of promises, and SyncTasks gives us the ability to chain commands on a single transaction. Given that IndexedDB was the most limiting transactional scenario that we needed to support, we followed that pattern with all of the other database providers, and designed them such that returning control to the event loop without issuing followup queries automatically resolves the transaction.

At this point, known feature work is complete and we are mostly just fixing bugs on the platform moving forward. If you have feature requests, feel free to file them, just make sure that you have behavior determined across all providers as part of your request, since all features need to be able to work across all the different providers.

Examples

The only current full example is available as part of the ReactXP samples, the TodoList sample app. If you pick up NoSQLProvider and use it in your open source application, please let us know so we can add more example links here!

Providers/Platforms/Support

We will soon list all of the providers available out of the box here, and list what platforms they can be used on, with any nuances of that platform.

Usage

Coming soon.

Compiling

Source

npm install
npm run build

Tests

npm install
npm run webtest

Testing

  1. Compile tests
  2. Open test.html in browser
  3. You can add ?grep=foo to the URL to run only tests containing 'foo' in the name