<commit_before>var q = require('q');
/**
 * Defines a resultset
 */
module.exports = function(manager, mapper) {
  // resultset constructor
  var resultset = function(view, criteria, data, misc) {
    this.criteria = criteria;
    this.length = misc.total_rows;
    this.offset = criteria.skip;
    this.limit = criteria.limit,
    this.rows = [];
    for(var i = 0; i < data.length; i++) {
      this.rows.push(
        mapper.create(data[i].doc.json)
      );
    }
  };
  // go to the next page
  resultset.prototype.next = function() {
    this.criteria.skip += this.limit;
    if ( this.criteria.skip < this.length) {
      return mapper.find(
        this.view, this.criteria
      );
    } else {
      return false;
    }
  };
  /**
   * Go to the previous page
   */
  resultset.prototype.previous = function() {
    this.criteria.skip -= this.limit;
    if ( this.criteria.skip > -1) {
      return mapper.find(
        this.view, this.criteria
      );
    } else {
      return false;
    }
  };
  /**
   * Go to the specified page
   */
  resultset.prototype.go: function(page) {
    this.criteria.skip = this.limit * (page - 1);
    if ( this.criteria.skip > -1 && this.criteria.skip < this.length) {
      return mapper.find(
        this.view, this.criteria
      );
    } else {
      return false;
    }
  };
  // manager
  return {
    deserialize: function(view, criteria, data, misc) {
      return new resultset(view, criteria, data, misc);
    }<commit_msg>fix token<commit_after>var q = require('q');
/**
 * Defines a resultset
 */
module.exports = function(manager, mapper) {
  // resultset constructor
  var resultset = function(view, criteria, data, misc) {
    this.criteria = criteria;
    this.length = misc.total_rows;
    this.offset = criteria.skip;
    this.limit = criteria.limit,
    this.rows = [];
    for(var i = 0; i < data.length; i++) {
      this.rows.push(
        mapper.create(data[i].doc.json)
      );
    }
  };
  // go to the next page
  resultset.prototype.next = function() {
    this.criteria.skip += this.limit;
    if ( this.criteria.skip < this.length) {
      return mapper.find(
        this.view, this.criteria
      );
    } else {
      return false;
    }
  };
  /**
   * Go to the previous page
   */
  resultset.prototype.previous = function() {
    this.criteria.skip -= this.limit;
    if ( this.criteria.skip > -1) {
      return mapper.find(
        this.view, this.criteria
      );
    } else {
      return false;
    }
  };
  /**
   * Go to the specified page
   */
  resultset.prototype.go = function(page) {
    this.criteria.skip = this.limit * (page - 1);
    if ( this.criteria.skip > -1 && this.criteria.skip < this.length) {
      return mapper.find(
        this.view, this.criteria
      );
    } else {
      return false;
    }
  };
  // manager
  return {
    deserialize: function(view, criteria, data, misc) {
      return new resultset(view, criteria, data, misc);
    }
{'fraction_non_alphanumeric': 0.14271220831924247, 'fraction_numerical': 0.002705444707473791, 'mean_word_length': 2.136797454931071, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3900214', 'n_tokens_mistral': 990, 'n_tokens_neox': 976, 'n_words': 217}