aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/modules/UTF8ValidateModule.h
blob: 18f309e6308d6ea3819f09c615009cdb51aa02fb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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