| 13 | using namespace Nan; // NOLINT(build/namespaces) |
| 14 | |
| 15 | NAN_METHOD(ReadU8) { |
| 16 | TypedArrayContents<uint8_t> data(info[0]); |
| 17 | |
| 18 | v8::Local<v8::Array> result = New<v8::Array>(data.length()); |
| 19 | for (size_t i=0; i < data.length(); i++) { |
| 20 | Set(result, i, New<v8::Number>((*data)[i])); |
| 21 | } |
| 22 | |
| 23 | info.GetReturnValue().Set(result); |
| 24 | } |
| 25 | |
| 26 | NAN_METHOD(ReadI32) { |
| 27 | TypedArrayContents<int32_t> data(info[0]); |
nothing calls this directly
no test coverage detected