node-addon-examples icon indicating copy to clipboard operation
node-addon-examples copied to clipboard

Node.js C++ addon examples from http://nodejs.org/docs/latest/api/addons.html

Results 169 node-addon-examples issues
Sort by recently updated
recently updated
newest added

Hi folks! I'm trying to use the powerful C++ Eigen Library(https://eigen.tuxfamily.org/index.php?title=Main_Page) or Armadillo Library(http://arma.sourceforge.net/) through NodeJS as a Addon for a Desktop Application built in Electron for a graduation final...

This pull request https://github.com/nodejs/node-addon-examples/pull/139 removes global static references from the examples. However, proposed solution works only for single object wrap. Consider the following example where two object wraps are created...

https://github.com/nodejs/node-addon-examples/blob/c1bdff050f8c7dc250f7779283fbab664bfb5bcd/function-reference-demo/node-addon-api/src/native-addon.cc#L4 https://github.com/nodejs/node-addon-examples/blob/c1bdff050f8c7dc250f7779283fbab664bfb5bcd/inherits_from_event_emitter/node-addon-api/src/native-emitter.cc#L7 It's not referred anywhere other than the `Init` function and having an "immortal" `Napi::FunctionReference` seems unnecessary since the constructor isn't invoked from native code. Curiously, these two examples...

when building example 6 with nan I get ``` CXX(target) Release/obj.target/addon/myobject.o ../myobject.cc:24:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result] exports->Set(context, ^~~~~~~~~~~~ ~~~~~~~~ 1 warning generated. ```

There is currently on example for these progress workers. The documentation is kind of a bit confusing here: https://github.com/nodejs/node-addon-api/blob/master/doc/async_worker_variants.md It doesn't really explain how to use the progress callback in...

below is the error i am getting when i am trying to build a native .node file in WSL. gyp info it worked if it ends with ok gyp info...

Is NAN still the state of the art way to create Node.js addons? Looking at a repo like this: https://github.com/nodejs/node-addon-examples/tree/master/1_hello_world it looks like NAPI has overtaken NAN, or? this info...

Hi, I got this error when I passed none paramter in my addon function: ``` # # Fatal error in , line 0 # Check failed: receiver.IsJSFunction(). # # #...

This issue on the node-addon-api repository raises the question of using JSDoc-style comments in C++ code implementing native addons: https://github.com/nodejs/node-addon-api/issues/758 In addition, @mhdawson has identified another potential benefit of adding...

Please provide example of napi operate arraybuffer. I want show ffmpeg decoded image to electron canvas. So, I tried create a ArrayBuffer in js, then pass as param in napi...