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

loveseat

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

loveseat

very limited couchdb interface

latest
npmnpm
Version
0.0.11
Version published
Maintainers
1
Created
Source

loveseat

Build Status

Sometimes you don't need the whole couch.

usage

var Loveseat = require('loveseat').Loveseat,
    db = new Loveseat({ db: 'mydb' });

db.insert({ name: 'My Document' }, function (err, res) {
  console.log(res);
});

other options

when making a new Loveseat, available options are:

  • db: the name of the db, defaults to "test"
  • url: the url to the couchdb, defaults to "http://localhost:5984/" and should be in that format if customized.

API

  • db.insert([ id,] document [, callback]) Insert (or update) a document with optional id
  • db.destroy(id, rev [, callback]) Delete document with id, revision rev
  • db.get(id [, callback]) Get document by id
  • db.create([callback]) Creates the database if it does not already exist
  • db.check([callback]) Checks for the presence of your selected db
  • db.makeRequest(method[, url, data, callback) Build a manual request to the couch.

All callbacks are of form (err, res) where res is the JSON-parsed response from couch.

license

MIT

Keywords

couchdb

FAQs

Package last updated on 01 May 2014

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