dist/command-builder.js
function buildSTORECommand(sequence, action = '', flags = [], options = {}) {
  let command = {
    command: options.byUid ? 'UID STORE' : 'STORE',
    attributes: [{
      type: 'sequence',
      value: sequence
    }]
  };

  command.attributes.push({
    type: 'atom',
    value: action.toUpperCase() + (options.silent ? '.SILENT' : '')
  });

  command.attributes.push(flags.map(flag => {
    return {
      type: 'atom',
      value: flag
    };
  }));

  return command;
}
function buildSTORECommand(sequence, action = '', flags = [], options = {}) {
  let command = {
    command: options.byUid ? 'UID STORE' : 'STORE',
    attributes: [{
      type: 'sequence',
      value: sequence
    }]
  };

  command.attributes.push({
    type: 'atom',
    value: action.toUpperCase() + (options.silent ? '.SILENT' : '')
  });

  command.attributes.push(flags.map(flag => {
    return {
      type: 'atom',
      value: flag
    };
  }));

  return command;
}
function buildSTORECommand ( sequence , action = '' , flags = [ ] , options = { } ) { let command = { command : options . byUid ? 'UID STORE' : 'STORE' , attributes : [ { type : 'sequence' , value : sequence } ] } ; command . attributes . push ( { type : 'atom' , value : action . toUpperCase ( ) + ( options . silent ? '.SILENT' : '' ) } ) ; command . attributes . push ( flags . map ( flag => { return { type : 'atom' , value : flag } ; } ) ) ; return command ; }
Creates an IMAP STORE command from the selected arguments
Creates an IMAP STORE command from the selected arguments