0.0.3 • Published 8 years ago

mongo-history v0.0.3

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

Get the mongodb's command history

npm version Build Status

Install

$ npm install --save mongo-history

Usage

const mongoHistory = require('mongo-history');

console.log(mongoHistory());
//=> ['show dbs', 'db.fs.files.count()', 'db.serverStatus()', 'show dbs', 'db.serverStatus()', ...]

console.log(mongoHistory({uniq: true}));
//=> [db.fs.files.count()', 'db.serverStatus()', 'show dbs', ...]

API

mongoHistory(options)

Returns an array of mongodb's commands. On Windows machines returns empty array.

options

uniq

Type: boolean Default: false

Returns array with uniq mongodb's commands.

License

MIT © Nikolay Spiridonov