MCPcopy Create free account
hub / github.com/devld/go-drive / SM

Method SM

script/utils.go:120–135  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

118}
119
120func (v *Value) SM() types.SM {
121 obj := v.object()
122 if obj == nil {
123 return nil
124 }
125 r := make(types.SM)
126
127 for _, k := range obj.Keys() {
128 p, e := obj.Get(k)
129 if e != nil {
130 v.vm.ThrowTypeError(e.Error())
131 }
132 r[k] = p.String()
133 }
134 return r
135}
136
137func (v *Value) Array() []*Value {
138 obj := v.object()

Callers 2

vm_httpFunction · 0.80
valueToScriptEntryStructFunction · 0.80

Calls 6

objectMethod · 0.95
KeysMethod · 0.80
ThrowTypeErrorMethod · 0.80
GetMethod · 0.65
ErrorMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected