-
Notifications
You must be signed in to change notification settings - Fork 8
Add Symbol.toStringTag for each class #58
base: master
Are you sure you want to change the base?
Conversation
…e of each class with string
@@ -101,4 +106,8 @@ Napi::Value Blob::Size(const Napi::CallbackInfo& info) { | |||
return Napi::Number::New(env, actual_->size()); | |||
} | |||
|
|||
Napi::Value Blob::toStringTag(const Napi::CallbackInfo& info) { | |||
return Napi::String::From(info.Env(), "Blob"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about adding more information? for example bytesize:
"Blob of N byte" or something like this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not understand your comment clearly. Do you mean that we should an object that contains more information?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. You cam share your ideas for related information in this comment. I will try to add them in this PR in next few days. Thanks.
@@ -198,4 +202,8 @@ Napi::Value Core::GetAvailableDevices(const Napi::CallbackInfo& info) { | |||
return available_devices; | |||
} | |||
|
|||
Napi::Value Core::toStringTag(const Napi::CallbackInfo& info) { | |||
return Napi::String::From(info.Env(), "Core"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest "OpenVINO Inference Engine Core"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is easy to finish it.
This PR can fix all the failed cases caused by using
String
to check class.The sample looks like:
This case is failed before the PR. And the PR fixes all similar failed test cases.