mongo-history

0.0.3 • Public • Published

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

Package Sidebar

Install

npm i mongo-history

Weekly Downloads

0

Version

0.0.3

License

MIT

Last publish

Collaborators

  • sohje