Datasets:
File size: 557 Bytes
0e239c6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | // Public test wiring only. Object implementation and assertions are upstream.
#include "napi.h"
#include <cstdlib>
#include <fstream>
Napi::Object InitObject(Napi::Env env);
static Napi::Object InitPublicObjectModule(Napi::Env env, Napi::Object exports) {
if (const char* trace = std::getenv("CROSSSWE_PUBLIC_BINDING_TRACE")) {
std::ofstream stream(trace, std::ios::app);
stream << CROSSSWE_PUBLIC_VARIANT << '\n';
}
exports.Set("object", InitObject(env));
return exports;
}
NODE_API_MODULE(NODE_GYP_MODULE_NAME, InitPublicObjectModule)
|