Initial commit
This commit is contained in:
19
node_modules/mongodb/lib/operations/is_capped.js
generated
vendored
Normal file
19
node_modules/mongodb/lib/operations/is_capped.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
'use strict';
|
||||
|
||||
const OptionsOperation = require('./options_operation');
|
||||
const handleCallback = require('../utils').handleCallback;
|
||||
|
||||
class IsCappedOperation extends OptionsOperation {
|
||||
constructor(collection, options) {
|
||||
super(collection, options);
|
||||
}
|
||||
|
||||
execute(callback) {
|
||||
super.execute((err, document) => {
|
||||
if (err) return handleCallback(callback, err);
|
||||
handleCallback(callback, null, !!(document && document.capped));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = IsCappedOperation;
|
||||
Reference in New Issue
Block a user