TypedArray detection methods
()
| 1248 | |
| 1249 | // TypedArray detection methods |
| 1250 | func (v *Value) typedArrayType() (int, bool) { |
| 1251 | if v == nil { |
| 1252 | return -1, false |
| 1253 | } |
| 1254 | typeID := int(C.JS_GetTypedArrayType(v.ref)) |
| 1255 | if typeID < 0 { |
| 1256 | return typeID, false |
| 1257 | } |
| 1258 | return typeID, true |
| 1259 | } |
| 1260 | |
| 1261 | func (v *Value) IsTypedArray() bool { |
| 1262 | _, ok := v.typedArrayType() |
no outgoing calls
no test coverage detected