Init. Map does not function and only working on backend at the moment.

This commit is contained in:
eetnaviation
2024-03-15 22:15:20 +02:00
commit d521b9db0c
1488 changed files with 252767 additions and 0 deletions

24
node_modules/sleep/module_init.cc generated vendored Normal file
View File

@ -0,0 +1,24 @@
#include "sleep.h"
using v8::FunctionTemplate;
using v8::String;
NAN_METHOD(MUSleep) {
Nan::HandleScope scope;
if (info.Length() < 1 || !info[0]->IsUint32()) {
Nan::ThrowError("Expected number of microseconds");
return;
}
node_usleep(Nan::To<uint32_t>(info[0]).FromJust());
info.GetReturnValue().SetUndefined();
}
NAN_MODULE_INIT(init) {
Nan::Set(target, Nan::New<String>("usleep").ToLocalChecked(),
Nan::GetFunction(Nan::New<FunctionTemplate>(MUSleep)).ToLocalChecked());
}
NODE_MODULE(node_sleep, init)