(a Value)
| 76 | } |
| 77 | |
| 78 | func (r *Runtime) createListFromArrayLike(a Value) []Value { |
| 79 | o := r.toObject(a) |
| 80 | if arr := r.checkStdArrayObj(o); arr != nil { |
| 81 | return arr.values |
| 82 | } |
| 83 | l := toLength(o.self.getStr("length", nil)) |
| 84 | res := make([]Value, 0, l) |
| 85 | for k := int64(0); k < l; k++ { |
| 86 | res = append(res, nilSafe(o.self.getIdx(valueInt(k), nil))) |
| 87 | } |
| 88 | return res |
| 89 | } |
| 90 | |
| 91 | func (r *Runtime) functionproto_apply(call FunctionCall) Value { |
| 92 | var args []Value |
no test coverage detected