mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
src: add LoadEnvironment() variant taking a string
Allow passing a string as the main module rather than using the callback variant. PR-URL: https://github.com/nodejs/node/pull/30467 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
This commit is contained in:
10 files changed
+94
-2
No files matched your search
@@ -33,6 +33,10 @@ Local<Set> ToJsSet(Local<Context> context, const std::set<std::string>& in) {
|
||||
return out;
|
||||
}
|
||||
|
||||
bool NativeModuleEnv::Add(const char* id, const UnionBytes& source) {
|
||||
return NativeModuleLoader::GetInstance()->Add(id, source);
|
||||
}
|
||||
|
||||
bool NativeModuleEnv::Exists(const char* id) {
|
||||
return NativeModuleLoader::GetInstance()->Exists(id);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user