Socket
Socket
Sign inDemoInstall

pouchdb-size

Package Overview
Dependencies
6
Maintainers
4
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    pouchdb-size

Adds disk_size to info()'s output for your leveldown backed PouchDB's.


Version published
Weekly downloads
711
decreased by-43.97%
Maintainers
4
Install size
662 kB
Created
Weekly downloads
 

Readme

Source

pouchdb-size

Adds disk_size to info()'s output for your *down backed PouchDB's.

Tested with leveldown, sqldown, jsondown, locket and medeadown. When it can't determine the database size, it falls back to the default info() output.

Example

//index.js
var PouchDB = require('pouchdb');
PouchDB.plugin(require('pouchdb-size'));

var db = new PouchDB('test');
db.installSizeWrapper();
db.info().then(function (resp) {
	//resp will contain disk_size
})

API

db.installSizeWrapper()

wraps db.info() in such a way that it will include a disk_size property in its output for supported database backends.

`db.getDiskSize([callback])

like PouchDB, this method both returns a Promise and accepts a callback. Either returns an error or the disk size of the current db.

Source

PouchDB Server and its sub-packages are distributed as a monorepo.

For a full list of packages, see the GitHub source.

License

The Apache 2 License. See the LICENSE file for more information.

Keywords

FAQs

Last updated on 25 Sep 2019

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc