packages/engine/scram-node/targets/scram-node/src/InitModule.cpp
Functions
| Name | |
|---|---|
| Napi::Object | Init(Napi::Env env, Napi::Object exports)<br>Initializes the module, making the RunScramCli function available to Node.js. |
Functions Documentation
function Init
cpp
Napi::Object Init(
Napi::Env env,
Napi::Object exports
)Initializes the module, making the RunScramCli function available to Node.js.
Parameters:
- env The Napi environment.
- exports The exports object to add the function to.
Return: Napi::Object The modified exports object.
Source code
cpp
#include "AsyncRunScramCli.h"
#include "RunScramCli.h"
#include <napi.h>
Napi::Object Init(Napi::Env env, Napi::Object exports) {
exports.Set("AsyncRunScramCli", Napi::Function::New(env, AsyncRunScramCli));
exports.Set("RunScramCli", Napi::Function::New(env, RunScramCli));
return exports;
}
// Macro to register the module with Node.js
NODE_API_MODULE(scram_node, Init)Updated on 2025-11-11 at 16:51:09 +0000
