I need a way to invoke JS callbacks from a C library that uses contexts. Here's an example: const ctx1 = mylib_init(); mylib_set_event_callback(ctx1 ...
I need a way to invoke JS callbacks from a C library that uses contexts. Here's an example: const ctx1 = mylib_init(); mylib_set_event_callback(ctx1 ...
how to convert info[0] to uchar array?? js "uint8clampedarray" -> info Nan::FunctionCallbackInfo<v8::Value> info[0] class v8::Local<cl ...
For a while now I've been trying to add Airtouch to HOmebridge and failing miserably. Current attempt The original code is this "platforms": [ ...
I'm trying to transfer a function to node.js project. I've succeeded in creating the function itself so far. The JavaScript code is accepting it and e ...
I'm currently sending data from C++ to NodeJS passing a NodeJS readableStream.push.bind(readableStream) to the C++ binding code and writing onto the s ...
I'm looking to create a native addon with Node-API (more specifically with the C++ wrapper module node-addon-api). I need to have global read-only da ...
So, I got that: https://github.com/nodejs/nan is used here I need to return a string value from this function. Function fib returns an int value. A ...
I recently completed making an asynchronous version for all the functions in a pure C API, wrapped with N-API to work with JS/TS as a nodejs addon. T ...
Apparently a situation has evolved over the years where there are three, four, or five main ways to write a nodeJS addon in C/C++ depending on where y ...
I'm interested in making my first native C/C++ addon for nodeJS. Conceptually it's a filesystem method that acts on a path or a file descriptor and i ...
I've written nodejs addon using V8. I'm stuck at a point where I'm trying to return Mat but all I'm getting is corrupted image with size of 2mb (for p ...
I have been exploring writing add-on modules for node.js in C/C++. So far I have a simple add on working where I can call an add on function form Java ...
This My first node.js and n_api. I have been using PHP/APACHI. But I need the c++ library for my web And I decided to using n_api. The problem is that ...
I am trying to read a file in the NAPI application and call the callback function to write it to the writestream in the nodejs application. exmaple_C ...
I'm able to execute a hello world example, but beyond that I'm new to nan and node add-ons. I'm concerned about memory leaks so if I'm causing any ...
I have updated my node from v8.16.2 to v12.18.3. When I'm trying now to load my addon I have this error: $ /usr/bin/node -e "require('/home/user1/add ...
I have a simple N-API wrapper around a C++ class. The class is getting instantiated and deconstructed, but the instance variable in the class is not b ...
If you guys have to know what I am actually doing, then this is it: https://github.com/Meigyoku-Thmn/CSBinary (A port of BinaryReader and BinaryWriter ...
I have a very simple C++ node addon. It exports 2 methods using the NODE_SET_METHOD node function. Both of them simply return a string and/or print so ...
My main problem is to call the asynchronous function from Node.js in addon and get the returned value. I am trying to resolve the promise returned fro ...