{"size": 407, "ext": "js", "max_stars_repo_path": "types/Int2.js", "max_stars_repo_name": "cfortuner/binary-message-buffer", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "types/Int2.js", "max_issues_repo_name": "cfortuner/binary-message-buffer", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "types/Int2.js", "max_forks_repo_name": "cfortuner/binary-message-buffer", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 17.6956521739, "max_line_length": 51, "alphanum_fraction": 0.6584766585}
/**
 * Definition of an Int4, a signed 4 bit integer
 * range: -2 to 1
 * uses BitBuffer functions for write/read
 */
import compareInts from './compare/compareIntegers'

var Int2 = {
  min: -2,
  max: 1,
  bits: 2,
  compare: compareInts,
  write: 'writeInt2',
  read: 'readInt2',
  offset: 0,
}

Int2.boundsCheck = function (value) {
  return value >= Int2.min && value <= Int2.max
}

export default Int2
