Browse Source

Merge pull request #104 from gballet/publish-class

Make class name a public field of Object
Dmitry Panov 6 years ago
parent
commit
52cab25ecb
1 changed files with 5 additions and 0 deletions
  1. 5 0
      value.go

+ 5 - 0
value.go

@@ -765,6 +765,11 @@ func (o *Object) MarshalJSON() ([]byte, error) {
 	return ctx.buf.Bytes(), nil
 	return ctx.buf.Bytes(), nil
 }
 }
 
 
+// ClassName returns the class name
+func (o *Object) ClassName() string {
+	return o.self.className()
+}
+
 func (o valueUnresolved) throw() {
 func (o valueUnresolved) throw() {
 	o.r.throwReferenceError(o.ref)
 	o.r.throwReferenceError(o.ref)
 }
 }