lib/request.js
function eachItem(callback) {
    var self = this;
    function wrappedCallback(err, data) {
      if (err) return callback(err, null);
      if (data === null) return callback(null, null);

      var config = self.service.paginationConfig(self.operation);
      var resultKey = config.resultKey;
      if (Array.isArray(resultKey)) resultKey = resultKey[0];
      var items = jmespath.search(data, resultKey);
      var continueIteration = true;
      AWS.util.arrayEach(items, function(item) {
        continueIteration = callback(null, item);
        if (continueIteration === false) {
          return AWS.util.abort;
        }
      });
      return continueIteration;
    }

    this.eachPage(wrappedCallback);
  }
function eachItem(callback) {
    var self = this;
    function wrappedCallback(err, data) {
      if (err) return callback(err, null);
      if (data === null) return callback(null, null);

      var config = self.service.paginationConfig(self.operation);
      var resultKey = config.resultKey;
      if (Array.isArray(resultKey)) resultKey = resultKey[0];
      var items = jmespath.search(data, resultKey);
      var continueIteration = true;
      AWS.util.arrayEach(items, function(item) {
        continueIteration = callback(null, item);
        if (continueIteration === false) {
          return AWS.util.abort;
        }
      });
      return continueIteration;
    }

    this.eachPage(wrappedCallback);
  }
function eachItem ( callback ) { var self = this ; function wrappedCallback ( err , data ) { if ( err ) return callback ( err , null ) ; if ( data === null ) return callback ( null , null ) ; var config = self . service . paginationConfig ( self . operation ) ; var resultKey = config . resultKey ; if ( Array . isArray ( resultKey ) ) resultKey = resultKey [ 0 ] ; var items = jmespath . search ( data , resultKey ) ; var continueIteration = true ; AWS . util . arrayEach ( items , function ( item ) { continueIteration = callback ( null , item ) ; if ( continueIteration === false ) { return AWS . util . abort ; } } ) ; return continueIteration ; } this . eachPage ( wrappedCallback ) ; }
Enumerates over individual items of a request, paging the responses if
necessary.

@api experimental
@since v1.4.0
Enumerates over individual items of a request paging the responses if necessary .