e-commercee
Version:
This package contains a backend of what would be the logic of a e-commercee software, the architecture used is made in 3 layers
20 lines (15 loc) • 493 B
JavaScript
;
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;