aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/modules/UTF8ValidateModule.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/bun.js/modules/UTF8ValidateModule.h')
-rw-r--r--src/bun.js/modules/UTF8ValidateModule.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/bun.js/modules/UTF8ValidateModule.h b/src/bun.js/modules/UTF8ValidateModule.h
new file mode 100644
index 000000000..18f309e63
--- /dev/null
+++ b/src/bun.js/modules/UTF8ValidateModule.h
@@ -0,0 +1,20 @@
+
+using namespace JSC;
+using namespace WebCore;
+
+namespace Zig {
+inline void
+generateNativeModule_UTF8Validate(JSC::JSGlobalObject *globalObject,
+ JSC::Identifier moduleKey,
+ Vector<JSC::Identifier, 4> &exportNames,
+ JSC::MarkedArgumentBuffer &exportValues) {
+ auto &vm = globalObject->vm();
+
+ exportNames.append(vm.propertyNames->defaultKeyword);
+ exportValues.append(JSC::JSFunction::create(
+ vm, globalObject, 1, "utf8Validate"_s, jsBufferConstructorFunction_isUtf8,
+ ImplementationVisibility::Public, NoIntrinsic,
+ jsBufferConstructorFunction_isUtf8));
+}
+
+} // namespace Zig