Use the features provided by `node-api-headers` (https://github.com/nodejs/node-api-headers) and do a refactor for the stub.