<commit_before>/**
 * The Selection module provides a cross-browser abstraction layer for range
 * and selection.
 *
 * @module core
 * @submodule selection
 */

function EditableSelection (editableHost, rangySelection) {
  this.host = editableHost;
  this.selection = rangySelection;
}

EditableSelection.prototype = (function () {
  return {

    text: function () {

    },

    isAllSelected: function () {

    },

    strip: function () {

    },

    deleteContent: function () {

    },

    /**
     * Expand the current selection
     *
     * @param: {String} either of these: 'word', 'sentence', 'tag' or 'block'.
     */
    expand: function (scope) {

    },

    parentNodes: function () {

    },

    isTheSameAs: function (otherSelection) {
      self = this.selection;
      other = otherSelection.selection;
      if (
        self.anchorNode === other.anchorNode &&
        self.anchorOffset === other.anchorOffset &&
        self.focusNode === other.focusNode &&
        self.focusOffset === other.focusOffset
      ) {
        return true;
      } else {
        return false;
      }
    }

  }
})();<commit_msg>Refactoring selection module<commit_after>/**
 * The Selection module provides a cross-browser abstraction layer for range
 * and selection.
 *
 * @module core
 * @submodule selection
 */

Editable.selection = (function() {
  'use strict';

  var Selection = function(editableHost, rangySelection) {
    this.host = editableHost;
    this.selection = rangySelection;
  };

  Selection.prototype = (function() {
    return {

      text: function() {

      },

      isAllSelected: function() {

      },

      strip: function() {

      },

      deleteContent: function() {

      },

      /**
       * Expand the current selection
       *
       * @param: {String} either of these: 'word', 'sentence', 'tag' or 'block'.
       */
      expand: function(scope) {

      },

      parentNodes: function() {

      },

      isTheSameAs: function(otherSelection) {
        self = this.selection;
        other = otherSelection.selection;
        if (
            self.anchorNode === other.anchorNode &&
            self.anchorOffset === other.anchorOffset &&
            self.focusNode === other.focusNode &&
            self.focusOffset === other.focusOffset
        ) {
          return true;
        } else {
          return false;
        }
      }

    };
  })();

  return {
    Selection: Selection
  };
})();
{'fraction_non_alphanumeric': 0.127442996742671, 'fraction_numerical': 0.0, 'mean_word_length': 2.090566037735849, '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': '2308607', 'n_tokens_mistral': 710, 'n_tokens_neox': 672, 'n_words': 159}