code: function (page) {
          if (!lang.isNumber(page)) {
              page = this.getCurrentPage();
          }
  
          var perPage = this.get('rowsPerPage'),
              records = this.get('totalRecords'),
              start, end;
  
          if (!page || !perPage) {
              return null;
          }
  
          start = (page - 1) * perPage;
          if (records !== Paginator.VALUE_UNLIMITED) {
              if (start >= records) {
                  return null;
              }
              end = Math.min(start + perPage, records) - 1;
          } else {
              end = start + perPage - 1;
          }
  
          return [start,end];
      }
docs: Get the start and end record indexes of the specified page.
  @method getPageRecords
  @param page {number} (optional) The page (current page if not specified)
  @return {Array} [start_index, end_index]