MCPcopy Create free account
hub / github.com/Tencent/kbone / removeItem

Method removeItem

packages/miniprogram-render/src/bom/storage.js:79–90  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

77 }
78
79 removeItem(key) {
80 if (!key || typeof key !== 'string') return
81
82 const oldValue = this.$_map[key] || null
83 delete this.$_map[key]
84
85 // 删除 key
86 const index = this.$_keys.indexOf(key)
87 if (index >= 0) this.$_keys.splice(index, 1)
88
89 this.$_triggerStorage(key, null, oldValue)
90 }
91
92 clear() {
93 this.$_map = {}

Callers

nothing calls this directly

Calls 1

$_triggerStorageMethod · 0.80

Tested by

no test coverage detected