Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
initialize() {
this.text = text(this.element)
this.build()
this.textArr = this.text.split('')
this.chunk = Array(this.textArr.length + 1)
.fill(1)
.map((v, k) => k)
this.chunkReverse = this.chunk.slice().reverse()
this.initTextOptions()
}
initialize() {
this.text = text(this.element)
text('', this.element)
this.instance.splitWord(this.text)
}
build() {
text('', this.element)
this.content = document.createElement('span')
addClass(this.instance.classes.WORD, this.content)
text(this.text, this.content)
append(this.content, this.element)
this.cursor = document.createElement('span')
addClass(this.instance.classes.CURSOR, this.cursor)
text('|', this.cursor)
append(this.cursor, this.element)
}
update: () => {
const content = this.totalText[count].textArr
.slice(0, this.totalText[count].chunkReverse[endTarget.textLen])
.join('')
text(`${content}`, this.content)
},
complete: () => {
initialize() {
this.text = text(this.element)
text('', this.element)
this.instance.splitWord(this.text)
}
initialize() {
this.text = text(this.element)
text('', this.element)
this.instance.splitWord(this.text)
}
build() {
text('', this.element)
this.content = document.createElement('span')
addClass(this.instance.classes.WORD, this.content)
text(this.text, this.content)
append(this.content, this.element)
this.cursor = document.createElement('span')
addClass(this.instance.classes.CURSOR, this.cursor)
text('|', this.cursor)
append(this.cursor, this.element)
}
initialize() {
this.text = text(this.element)
text('', this.element)
this.instance.splitWord(this.text)
}
build() {
text('', this.element)
this.content = document.createElement('span')
addClass(this.instance.classes.WORD, this.content)
text(this.text, this.content)
append(this.content, this.element)
this.cursor = document.createElement('span')
addClass(this.instance.classes.CURSOR, this.cursor)
text('|', this.cursor)
append(this.cursor, this.element)
}