mirror of
https://github.com/oven-sh/bun
synced 2026-02-17 22:32:06 +00:00
22 lines
623 B
C++
22 lines
623 B
C++
|
|
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 = JSC::getVM(globalObject);
|
|
|
|
exportNames.append(vm.propertyNames->defaultKeyword);
|
|
exportValues.append(JSC::JSFunction::create(
|
|
vm, globalObject, 1, "utf8Validate"_s, jsBufferConstructorFunction_isUtf8,
|
|
ImplementationVisibility::Public, NoIntrinsic,
|
|
jsBufferConstructorFunction_isUtf8));
|
|
}
|
|
|
|
} // namespace Zig
|