New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

dbs-api

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dbs-api

An API for all the DBs.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

dbs-api

One API for all the DBs.

Install

npm i db-api

And the DB you want to use, let's use PouchDB, for now:

npm i pouchdb

Usage

async function main() {

    const db = require('db-api')()

    let entry = await db.addEntry({'some': 'data'})

    entry.some = 'other-data'

    await db.changeEntry(entry)

    await db.deleteEntry(entry)

    entry = await db.getEntry('entry-id')

    const entries = await db.getEntries()

    await db.deleteEntries()

}

main.catch( error => console.log(error) )

Supported DBs

Currently only PouchDB.

Contact

Open an issue on https://github.com/ida/db-api

License

MIT

Keywords

db

FAQs

Package last updated on 21 May 2021

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