     }
 
 
+# Export the above interface.
+module.exports = {
+  BrowserRange
+  NormalizedRange
+  SerializedRange
+  normalizeBoundaries
+  splitBoundaries
+}
+
+
+# Private helpers.
+
 # Return true if the given predicate is true for every Node of the tree.
 # The predicate function is invoked once for each Node in the tree.
 # An optional third argument specifies a traversal order and should be a

  while node? and not contains(node, other)
    node = node.parentNode
  return node


# Export the public module interface.
module.exports = {
  BrowserRange
  NormalizedRange
  SerializedRange
  normalizeBoundaries
  splitBoundaries
}

xpath = require('./xpath')

# https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
TEXT_NODE = 3

# Public interface.

normalizeBoundaries = (range) ->
  {startContainer, startOffset, endContainer, endOffset} = range
