<commit_before>/**
 * @fileoverview Wrapper for a IndexedDB key range.
 */


goog.provide('ydn.db.IDBKeyRange');
goog.provide('ydn.db.KeyRange');



/**
 * For those browser that not implemented IDBKeyRange.
 * @param {*} lower The value of the lower bound.
 * @param {*} upper  The value of the upper bound.
 * @param {boolean=} lowerOpen  If true, the range excludes the lower bound
 * value.
 * @param {boolean=} upperOpen If true, the range excludes the lower bound
 * value.
 * @constructor
 */
ydn.db.KeyRange = function(lower, upper, lowerOpen, upperOpen) {
  this['lower'] = lower;
  this['upper'] = upper;
  this['lowerOpen'] = !!lowerOpen;
  this['upperOpen'] = !!upperOpen;
};


/**
 *
 * @type {*}
 */
ydn.db.KeyRange.prototype.lower = undefined;

/**
 *
 * @type {*}
 */
ydn.db.KeyRange.prototype.upper = undefined;

/**
 *
 * @type {boolean}
 */
ydn.db.KeyRange.prototype.lowerOpen = false;

/**
 *
 * @type {boolean}
 */
ydn.db.KeyRange.prototype.upperOpen = false;

/**
 * @override
 * @return {!Object} in JSON format.
 */
ydn.db.KeyRange.prototype.toJSON = function() {
  return ydn.db.KeyRange.toJSON(this);
};


/**
 * Robust efficient cloning of a keyrnge.
 * @param {(ydn.db.KeyRange|ydn.db.IDBKeyRange)=} kr key range to be cloned.
 * @return {!ydn.db.KeyRange|undefined} cloned key range.
 */
ydn.db.KeyRange.clone = function(kr) {
  if (goog.isDefAndNotNull(kr)) {
    return new ydn.db.KeyRange(kr.lower, kr.upper,
        !!kr.lowerOpen, !!kr.upperOpen);
  } else {
    return undefined;<commit_msg>key range<commit_after>/**
 * @fileoverview Wrapper for a IndexedDB key range.
 */


goog.provide('ydn.db.IDBKeyRange');
goog.provide('ydn.db.KeyRange');



/**
 * For those browser that not implemented IDBKeyRange.
 * @param {*} lower The value of the lower bound.
 * @param {*} upper  The value of the upper bound.
 * @param {boolean=} lowerOpen  If true, the range excludes the lower bound
 * value.
 * @param {boolean=} upperOpen If true, the range excludes the lower bound
 * value.
 * @constructor
 */
ydn.db.KeyRange = function(lower, upper, lowerOpen, upperOpen) {
  this['lower'] = lower;
  this['upper'] = upper;
  this['lowerOpen'] = !!lowerOpen;
  this['upperOpen'] = !!upperOpen;
};


/**
 *
 * @type {*}
 */
ydn.db.KeyRange.prototype.lower = undefined;

/**
 *
 * @type {*}
 */
ydn.db.KeyRange.prototype.upper = undefined;

/**
 *
 * @type {boolean}
 */
ydn.db.KeyRange.prototype.lowerOpen = false;

/**
 *
 * @type {boolean}
 */
ydn.db.KeyRange.prototype.upperOpen = false;

/**
 * @override
 * @return {!Object} in JSON format.
 */
ydn.db.KeyRange.prototype.toJSON = function() {
  return ydn.db.KeyRange.toJSON(this);
};


/**
 *
 * @return {IDBKeyRange}
 */
ydn.db.KeyRange.prototype.toIDBKeyRange = function() {
  return ydn.db.KeyRange.parseIDBKeyRange(this);
};


/**
 * Robust efficient cloning of a keyrnge.
 * @param {(ydn.db.KeyRange|ydn.db.IDBKeyRange)=} kr key range to be cloned.
 * @return {!ydn.db.KeyRange|undefined} cloned key range.
 */
ydn.db.KeyRange.clone = function(kr) {
  if (goog.isDefAndNotNull(kr)) {
    return new ydn.db.KeyRange(kr.lower, kr.upper,
        !!kr.lowerOpen, !!kr.upperOpen);
  } else {
    return undefined;
{'fraction_non_alphanumeric': 0.17037269025994362, 'fraction_numerical': 0.0, 'mean_word_length': 3.569384835479256, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6858215', 'n_tokens_mistral': 1161, 'n_tokens_neox': 1124, 'n_words': 260}