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

Method deleteStr

object_template.go:247–259  ·  view source on GitHub ↗
(name unistring.String, throw bool)

Source from the content-addressed store, hash-verified

245}
246
247func (o *templatedObject) deleteStr(name unistring.String, throw bool) bool {
248 if val := o.getOwnPropStr(name); val != nil {
249 if !o.checkDelete(name, val, throw) {
250 return false
251 }
252 o.materialisePropNames()
253 o._delete(name)
254 if _, exists := o.tmpl.props[name]; exists {
255 o.values[name] = nil // white hole
256 }
257 }
258 return true
259}
260
261func (o *templatedObject) deleteSym(s *Symbol, throw bool) bool {
262 o.materialiseSymbols()

Callers

nothing calls this directly

Calls 4

getOwnPropStrMethod · 0.95
materialisePropNamesMethod · 0.95
checkDeleteMethod · 0.80
_deleteMethod · 0.45

Tested by

no test coverage detected