As Node-Addon-Api (N-API) is used, these addons can be compiled for both Node.js Electron.js and NW.js(Node-Webkit). Samples are based on NW.js.
Callback function with parameters
Sync function to take a number as argument and increment it and return the result.
Async function to take a number and a callback as arguments and increment and return the result.