aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/bindings/bindings.zig
diff options
context:
space:
mode:
authorGravatar zhiyuan <32867472+zhiyuang@users.noreply.github.com> 2023-03-17 18:49:41 +0800
committerGravatar GitHub <noreply@github.com> 2023-03-17 03:49:41 -0700
commitc5f2b4264993739440f73d166280c9ec74e27c1c (patch)
treeae7acff72ecadb190bf84714b34fa1ad8dabedf9 /src/bun.js/bindings/bindings.zig
parent37293cb26a8239d4f387218a1fdadc522787835f (diff)
downloadbun-c5f2b4264993739440f73d166280c9ec74e27c1c.tar.gz
bun-c5f2b4264993739440f73d166280c9ec74e27c1c.tar.zst
bun-c5f2b4264993739440f73d166280c9ec74e27c1c.zip
Feat(test): add toMatch (#2404)
Diffstat (limited to 'src/bun.js/bindings/bindings.zig')
-rw-r--r--src/bun.js/bindings/bindings.zig10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/bun.js/bindings/bindings.zig b/src/bun.js/bindings/bindings.zig
index 3059ba09f..1ac1fc5ca 100644
--- a/src/bun.js/bindings/bindings.zig
+++ b/src/bun.js/bindings/bindings.zig
@@ -3651,6 +3651,10 @@ pub const JSValue = enum(JSValueReprInt) {
return cppFn("toZigString", .{ this, out, global });
}
+ pub fn toMatch(this: JSValue, global: *JSGlobalObject, other: JSValue) bool {
+ return cppFn("toMatch", .{ this, global, other });
+ }
+
pub fn asArrayBuffer_(this: JSValue, global: *JSGlobalObject, out: *ArrayBuffer) bool {
return cppFn("asArrayBuffer_", .{ this, global, out });
}
@@ -3983,6 +3987,10 @@ pub const JSValue = enum(JSValueReprInt) {
});
}
+ pub fn stringIncludes(this: JSValue, globalObject: *JSGlobalObject, other: JSValue) bool {
+ return cppFn("stringIncludes", .{ this, globalObject, other });
+ }
+
pub inline fn asRef(this: JSValue) C_API.JSValueRef {
return @intToPtr(C_API.JSValueRef, @bitCast(usize, @enumToInt(this)));
}
@@ -4121,8 +4129,10 @@ pub const JSValue = enum(JSValueReprInt) {
"toWTFString",
"toZigException",
"toZigString",
+ "toMatch",
"isConstructor",
"isInstanceOf",
+ "stringIncludes",
};
};