<commit_before>var Delta = require('quill-delta');


module.exports = {
  name: 'rich-text',
  uri: 'http://sharejs.org/types/rich-text/v0',

  create: function (initial) {
    var delta = new Delta(initial)
    return delta.ops;
  },

  apply: function (snapshot, ops) {
    snapshot = new Delta(snapshot);
    var delta = new Delta(ops);
    var applied = snapshot.compose(delta);
    return applied.ops;
  },

  compose: function (ops1, ops2) {
    var delta1 = new Delta(ops1);
    var delta2 = new Delta(ops2);
    var composed = delta1.compose(delta2);
    return composed.ops;
  },

  transform: function (ops1, ops2, side) {
    var delta1 = new Delta(ops1);
    var delta2 = new Delta(ops2);
    var transformed = delta1.transform(delta2, side === 'left');
    return transformed.ops;
  }
};
<commit_msg>fix order<commit_after>var Delta = require('quill-delta');


module.exports = {
  name: 'rich-text',
  uri: 'http://sharejs.org/types/rich-text/v0',

  create: function (initial) {
    var delta = new Delta(initial)
    return delta.ops;
  },

  apply: function (snapshot, ops) {
    snapshot = new Delta(snapshot);
    var delta = new Delta(ops);
    var applied = snapshot.compose(delta);
    return applied.ops;
  },

  compose: function (ops1, ops2) {
    var delta1 = new Delta(ops1);
    var delta2 = new Delta(ops2);
    var composed = delta1.compose(delta2);
    return composed.ops;
  },

  transform: function (ops1, ops2, side) {
    var delta1 = new Delta(ops1);
    var delta2 = new Delta(ops2);
    var transformed = delta2.transform(delta1, side === 'left');
    return transformed.ops;
  }
};

{'fraction_non_alphanumeric': 0.14180024660912455, 'fraction_numerical': 0.02096177558569667, 'mean_word_length': 3.204663212435233, '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': '1628039', 'n_tokens_mistral': 548, 'n_tokens_neox': 543, 'n_words': 141}