diff options
Diffstat (limited to 'src/bun.js/modules/BunObjectModule.cpp')
-rw-r--r-- | src/bun.js/modules/BunObjectModule.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/bun.js/modules/BunObjectModule.cpp b/src/bun.js/modules/BunObjectModule.cpp new file mode 100644 index 000000000..55f694fa1 --- /dev/null +++ b/src/bun.js/modules/BunObjectModule.cpp @@ -0,0 +1,24 @@ +#include "root.h" + +#include "ZigGlobalObject.h" + +#include "ObjectModule.h" + +namespace Zig { +void generateNativeModule_BunObject(JSC::JSGlobalObject *lexicalGlobalObject, + JSC::Identifier moduleKey, + Vector<JSC::Identifier, 4> &exportNames, + JSC::MarkedArgumentBuffer &exportValues) { + JSC::VM &vm = lexicalGlobalObject->vm(); + Zig::GlobalObject *globalObject = + reinterpret_cast<Zig::GlobalObject *>(lexicalGlobalObject); + + JSObject *object = + globalObject->get(globalObject, Identifier::fromString(vm, "Bun"_s)) + .getObject(); + + exportNames.append(vm.propertyNames->defaultKeyword); + exportValues.append(object); +} + +} // namespace Zig
\ No newline at end of file |