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

Method strToKey

object_gomap_reflect.go:32–37  ·  view source on GitHub ↗
(name string, throw bool)

Source from the content-addressed store, hash-verified

30}
31
32func (o *objectGoMapReflect) strToKey(name string, throw bool) reflect.Value {
33 if o.keyType.Kind() == reflect.String {
34 return reflect.ValueOf(name).Convert(o.keyType)
35 }
36 return o.toKey(newStringValue(name), throw)
37}
38
39func (o *objectGoMapReflect) _getKey(key reflect.Value) Value {
40 if !key.IsValid() {

Callers 5

_getStrMethod · 0.95
setOwnStrMethod · 0.95
defineOwnPropertyStrMethod · 0.95
hasOwnPropertyStrMethod · 0.95
deleteStrMethod · 0.95

Calls 2

toKeyMethod · 0.95
newStringValueFunction · 0.85

Tested by

no test coverage detected