Skip to content

Commit dd08777

Browse files
authored
Merge pull request #81 from lightpanda-io/value_is_symbol
expose value.isSymbol
2 parents e24ad2e + 3b539d0 commit dd08777

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

src/binding.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -894,6 +894,8 @@ bool v8__Value__IsObject(const v8::Value& self) { return self.IsObject(); }
894894

895895
bool v8__Value__IsString(const v8::Value& self) { return self.IsString(); }
896896

897+
bool v8__Value__IsSymbol(const v8::Value& self) { return self.IsSymbol(); }
898+
897899
bool v8__Value__IsArray(const v8::Value& self) { return self.IsArray(); }
898900

899901
bool v8__Value__IsTypedArray(const v8::Value& self) { return self.IsTypedArray(); }

src/binding.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,7 @@ bool v8__Value__IsNumber(const Value* self);
485485
bool v8__Value__IsNumberObject(const Value* self);
486486
bool v8__Value__IsObject(const Value* self);
487487
bool v8__Value__IsString(const Value* self);
488+
bool v8__Value__IsSymbol(const Value* self);
488489
bool v8__Value__IsArray(const Value* self);
489490
bool v8__Value__IsTypedArray(const Value* self);
490491
bool v8__Value__IsUint8ClampedArray(const Value* self);

src/v8.zig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2113,6 +2113,11 @@ pub const Value = struct {
21132113
return c.v8__Value__IsString(self.handle);
21142114
}
21152115

2116+
2117+
pub fn isSymbol(self: Self) bool {
2118+
return c.v8__Value__IsSymbol(self.handle);
2119+
}
2120+
21162121
pub fn isFunction(self: Self) bool {
21172122
return c.v8__Value__IsFunction(self.handle);
21182123
}

0 commit comments

Comments
 (0)