MCPcopy
hub / github.com/hotwired/stimulus / delete

Method delete

src/core/data_map.ts:35–43  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

33 }
34
35 delete(key: string): boolean {
36 if (this.has(key)) {
37 const name = this.getAttributeNameForKey(key)
38 this.element.removeAttribute(name)
39 return true
40 } else {
41 return false
42 }
43 }
44
45 getAttributeNameForKey(key: string): string {
46 return `data-${this.identifier}-${dasherize(key)}`

Callers 10

scopeDisconnectedMethod · 0.45
disconnectModuleMethod · 0.45
disconnectOutletMethod · 0.45
setFunction · 0.45
bindingDisconnectedMethod · 0.45
disconnectActionMethod · 0.45
disconnectTargetMethod · 0.45
"test DataSet#delete"Method · 0.45

Calls 3

hasMethod · 0.95
removeAttributeMethod · 0.80

Tested by

no test coverage detected