AsMap returns a Go map version of the object
()
| 22 | |
| 23 | // AsMap returns a Go map version of the object |
| 24 | func (o Object) AsMap() map[string]string { |
| 25 | out := make(map[string]string, 0) |
| 26 | if !o.HasValidNode() { |
| 27 | return out |
| 28 | } |
| 29 | |
| 30 | for _, k := range o.GetKeys() { |
| 31 | out[k] = o.GetString(k, "") |
| 32 | } |
| 33 | return out |
| 34 | } |
| 35 | |
| 36 | // HasValidNode returns true if the underlying node is |
| 37 | // a valid JavaScript object |
nothing calls this directly
no test coverage detected