Re: [v8-users] Looking for streamlined way to access object properties

2016-12-07 Thread kent williams
I answered my own question again, sort of. Both v8::Object::Has() and v8::Object::HasOwnProperty() will return true if a property exists on an object. On Wednesday, December 7, 2016 at 10:44:20 AM UTC-6, kent williams wrote: > > I should maybe try v8::Object::Has -- it looks like it will tell

Re: [v8-users] Looking for streamlined way to access object properties

2016-12-07 Thread kent williams
I should maybe try v8::Object::Has -- it looks like it will tell you if an object has a property, but it isn't really documented anywhere what it does. On Wednesday, December 7, 2016 at 4:03:02 AM UTC-6, Jochen Eisinger wrote: > > You could use v8::Object::GetOwnPropertyNames instead of trying

Re: [v8-users] Looking for streamlined way to access object properties

2016-12-07 Thread Jochen Eisinger
You could use v8::Object::GetOwnPropertyNames instead of trying each key individually On Tue, Dec 6, 2016 at 11:04 PM kent williams wrote: > There's a convention that we use for our C++ native functions called from > C++, where required arguments are followed

[v8-users] Looking for streamlined way to access object properties

2016-12-06 Thread kent williams
There's a convention that we use for our C++ native functions called from C++, where required arguments are followed (optionally) by an object whose properties are additional flags. EG var num = convertNumber(x); var num2 = convertNumber(x, { base: 8 }); Is there a streamlined way to extract