MCPcopy Create free account
hub / github.com/breck7/scroll / deleteDuplicates

Method deleteDuplicates

external/.scrollLibs.js:17044–17052  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17042 return this
17043 }
17044 deleteDuplicates() {
17045 const set = new Set()
17046 this.topDownArray.forEach(particle => {
17047 const str = particle.toString()
17048 if (set.has(str)) particle.destroy()
17049 else set.add(str)
17050 })
17051 return this
17052 }
17053 setAtom(index, atom) {
17054 const wi = this.atomBreakSymbol
17055 const atoms = this._getLine().split(wi)

Callers

nothing calls this directly

Calls 5

forEachMethod · 0.80
destroyMethod · 0.80
toStringMethod · 0.45
hasMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected