simpleDiffString = (a, b) => {
  let left = 0; // number of same characters counting from left

  let right = 0; // number of same characters counting from right

  while (left < a.length && left < b.length && a[left] === b[left]) {
    left++;
  }

  if (left !== a.length || left !== b.length) {
    // Only check right if a !== b
    while (right + left < a.length && right + left < b.length && a[a.length - right - 1] === b[b.length - right - 1]) {
      right++;
    }
  }

  return {
    index: left,
    remove: a.length - left - right,
    insert: b.slice(left, b.length - right)
  };
}
Create a diff between two strings. This diff implementation is highly
efficient, but not very sophisticated.

@function

@param {string} a The old version of the string
@param {string} b The updated version of the string
@return {SimpleDiff<string>} The diff description.