lib/definitions/saga.js
function (cmds, callback) {
    if (!cmds || cmds.length === 0) {
      return callback(null);
    }

    var self = this;
    async.each(cmds, function (cmd, fn) {
      if (dotty.exists(cmd, self.definitions.command.id)) {
        return fn(null);
      }

      self.getNewId(function (err, id) {
        if (err) {
          debug(err);
          return fn(err);
        }
        dotty.put(cmd, self.definitions.command.id, id);
        fn(null);
      });
    }, callback);
  }
function (cmds, callback) {
    if (!cmds || cmds.length === 0) {
      return callback(null);
    }

    var self = this;
    async.each(cmds, function (cmd, fn) {
      if (dotty.exists(cmd, self.definitions.command.id)) {
        return fn(null);
      }

      self.getNewId(function (err, id) {
        if (err) {
          debug(err);
          return fn(err);
        }
        dotty.put(cmd, self.definitions.command.id, id);
        fn(null);
      });
    }, callback);
  }
function ( cmds , callback ) { if ( ! cmds || cmds . length === 0 ) { return callback ( null ) ; } var self = this ; async . each ( cmds , function ( cmd , fn ) { if ( dotty . exists ( cmd , self . definitions . command . id ) ) { return fn ( null ) ; } self . getNewId ( function ( err , id ) { if ( err ) { debug ( err ) ; return fn ( err ) ; } dotty . put ( cmd , self . definitions . command . id , id ) ; fn ( null ) ; } ) ; } , callback ) ; }
Checks if the passed commands have a command id. If not it will generate a new one and extend the command with it.
@param {Array}    cmds     The passed commands array.
@param {Function} callback The function, that will be called when this action is completed.
`function(err){}`
Checks if the passed commands have a command id . If not it will generate a new one and extend the command with it .