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

Method set

object.go:1510–1519  ·  view source on GitHub ↗
(name Value, val, receiver Value, throw bool)

Source from the content-addressed store, hash-verified

1508}
1509
1510func (o *Object) set(name Value, val, receiver Value, throw bool) bool {
1511 switch name := name.(type) {
1512 case valueInt:
1513 return o.setIdx(name, val, receiver, throw)
1514 case *Symbol:
1515 return o.setSym(name, val, receiver, throw)
1516 default:
1517 return o.setStr(name.string(), val, receiver, throw)
1518 }
1519}
1520
1521func (o *Object) setOwn(name Value, val Value, throw bool) bool {
1522 switch name := name.(type) {

Callers

nothing calls this directly

Calls 4

setIdxMethod · 0.95
setSymMethod · 0.95
setStrMethod · 0.95
stringMethod · 0.65

Tested by

no test coverage detected