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

plasmiddb

v1.4.0

Published

Plasmid is a storage solution for offline-first web applications, offering consistent master/slave updates to keep multiple browser instances up to do between a single server.

Downloads

10

Readme

Plasmid

Plasmid is a storage solution for offline-first web applications, offering consistent master/slave updates to keep multiple browser instances up to do between a single server.

Plasmid is focused on uses with per-user databases. Such as task and todo lists, note management, writing tools, and other uses.

MVC frameworks are very easy to integrate with Plasmid, especially when using data binding libraries with your client-side templates. Results from Plasmid database queries can be bound to in your templates, and the results can automatically update when new data is created or updated underneath, creating a very smooth experience.

See more details at the Plasmid website

http://plasmid.readthedocs.org/en/latest/

Installation

PlasmidDB is now hosted on NPM. To use it in your web applications, Browserify or WebPack are recommended. Note: PlasmidDB is a browser-only package and will not work in NodeJS.

If you use PlasmidDB via the NPM package, simple require("plasmiddb").

If you'd like to use PlasmidDB without NPM, the website has distributions available that will package PlasmidDB up for use in a web application available as a global variable plasmid.

Usage

To connect to a Plasmid database, you'll need to source the required Javascript files, and setup the needed configuration.

var database = new plasmid.Database({
    name: 'todo',

Defining a database is a simple matter of spelling out the stores available to place objects into, and what indexes they might have on their properties.

    schema: {
        version: 1,
        stores: {
            todo: {
                sync: true,
                indexes: {
                    todo: {key: "completed", unique: false, multi: false}
                }
            },
        },
    }
});

Stores are easily accessable

var todos = database.stores.todo;
todos.put(null, {
    text: "Learn how to use Plasmid.js!",
    completed: false
})

And data is easily updated

todos.get(key)
.then(function(todo) {
    todo.completed = true;
    todos.put(key, todo);
});

You can read a lot more at the API Reference.