MCPcopy Create free account
hub / github.com/nodejs/nan / NAN_METHOD

Function NAN_METHOD

test/cpp/typedarrays.cpp:15–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13using namespace Nan; // NOLINT(build/namespaces)
14
15NAN_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
26NAN_METHOD(ReadI32) {
27 TypedArrayContents<int32_t> data(info[0]);

Callers

nothing calls this directly

Calls 4

SetFunction · 0.50
lengthMethod · 0.45
SetMethod · 0.45
GetReturnValueMethod · 0.45

Tested by

no test coverage detected