command.js 436 B

12345678910111213141516
  1. 'use strict';
  2. var betterStackTraces = /development/i.test(process.env.NODE_ENV) || /\bredis\b/i.test(process.env.NODE_DEBUG);
  3. function Command (command, args, callback, call_on_write) {
  4. this.command = command;
  5. this.args = args;
  6. this.buffer_args = false;
  7. this.callback = callback;
  8. this.call_on_write = call_on_write;
  9. if (betterStackTraces) {
  10. this.error = new Error();
  11. }
  12. }
  13. module.exports = Command;