MCPcopy Create free account
hub / github.com/dop251/goja / deleteStr

Method deleteStr

builtin_proxy.go:189–199  ·  view source on GitHub ↗
(target *Object, prop unistring.String)

Source from the content-addressed store, hash-verified

187}
188
189func (h *nativeProxyHandler) deleteStr(target *Object, prop unistring.String) (bool, bool) {
190 if trap := h.handler.DeletePropertyIdx; trap != nil {
191 if idx, ok := strToInt(prop); ok {
192 return trap(target, idx), true
193 }
194 }
195 if trap := h.handler.DeleteProperty; trap != nil {
196 return trap(target, prop.String()), true
197 }
198 return false, false
199}
200
201func (h *nativeProxyHandler) deleteIdx(target *Object, prop valueInt) (bool, bool) {
202 if trap := h.handler.DeletePropertyIdx; trap != nil {

Callers

nothing calls this directly

Calls 2

strToIntFunction · 0.85
StringMethod · 0.65

Tested by

no test coverage detected