Pathologic was missing because of a .git folder inside.
[yaffs-website] / node_modules / min-document / dom-text.js
1 module.exports = DOMText
2
3 function DOMText(value, owner) {
4     if (!(this instanceof DOMText)) {
5         return new DOMText(value)
6     }
7
8     this.data = value || ""
9     this.length = this.data.length
10     this.ownerDocument = owner || null
11 }
12
13 DOMText.prototype.type = "DOMTextNode"
14 DOMText.prototype.nodeType = 3
15 DOMText.prototype.nodeName = "#text"
16
17 DOMText.prototype.toString = function _Text_toString() {
18     return this.data
19 }
20
21 DOMText.prototype.replaceData = function replaceData(index, length, value) {
22     var current = this.data
23     var left = current.substring(0, index)
24     var right = current.substring(index + length, current.length)
25     this.data = left + value + right
26     this.length = this.data.length
27 }