@@ -72,7 +72,7 @@ Creates a new `Napi::Object` value.
72
72
### Set()
73
73
74
74
``` cpp
75
- bool Napi::Object::Set (____ key, ___ _ value);
75
+ bool Napi::Object::Set (____ key, ___ _ value) const ;
76
76
```
77
77
- `[in] key`: The name for the property being assigned.
78
78
- `[in] value`: The value being assigned to the property.
@@ -91,7 +91,7 @@ The `value` can be of any type that is accepted by [`Napi::Value::From`][].
91
91
### Delete()
92
92
93
93
```cpp
94
- bool Napi::Object::Delete(____ key);
94
+ bool Napi::Object::Delete(____ key) const ;
95
95
```
96
96
- ` [in] key ` : The name of the property to delete.
97
97
@@ -143,7 +143,7 @@ Note: This is equivalent to the JavaScript instanceof operator.
143
143
### AddFinalizer()
144
144
```cpp
145
145
template <typename Finalizer, typename T>
146
- inline void AddFinalizer(Finalizer finalizeCallback, T* data);
146
+ inline void AddFinalizer(Finalizer finalizeCallback, T* data) const ;
147
147
```
148
148
149
149
- ` [in] finalizeCallback ` : The function to call when the object is garbage-collected.
@@ -161,7 +161,7 @@ where `data` is the pointer that was passed into the call to `AddFinalizer()`.
161
161
template <typename Finalizer, typename T, typename Hint>
162
162
inline void AddFinalizer(Finalizer finalizeCallback,
163
163
T* data,
164
- Hint* finalizeHint);
164
+ Hint* finalizeHint) const ;
165
165
```
166
166
167
167
- ` [in] data ` : The data to associate with the object.
@@ -184,7 +184,7 @@ The properties whose key is a `Symbol` will not be included.
184
184
185
185
### HasOwnProperty()
186
186
``` cpp
187
- bool Napi::Object::HasOwnProperty (____ key); const
187
+ bool Napi::Object::HasOwnProperty (____ key) const;
188
188
```
189
189
- `[in] key` The name of the property to check.
190
190
@@ -200,7 +200,7 @@ The key can be any of the following types:
200
200
### DefineProperty()
201
201
202
202
```cpp
203
- bool Napi::Object::DefineProperty (const Napi::PropertyDescriptor& property);
203
+ bool Napi::Object::DefineProperty (const Napi::PropertyDescriptor& property) const ;
204
204
```
205
205
- ` [in] property ` : A [ ` Napi::PropertyDescriptor ` ] ( property_descriptor.md ) .
206
206
@@ -209,7 +209,7 @@ Define a property on the object.
209
209
### DefineProperties()
210
210
211
211
``` cpp
212
- bool Napi::Object::DefineProperties (____ properties)
212
+ bool Napi::Object::DefineProperties (____ properties) const;
213
213
```
214
214
- `[in] properties`: A list of [`Napi::PropertyDescriptor`](property_descriptor.md). Can be one of the following types:
215
215
- const std::initializer_list<Napi::PropertyDescriptor>&
@@ -220,7 +220,7 @@ Defines properties on the object.
220
220
### Freeze()
221
221
222
222
```cpp
223
- void Napi::Object::Freeze()
223
+ void Napi::Object::Freeze() const;
224
224
```
225
225
226
226
The ` Napi::Object::Freeze() ` method freezes an object. A frozen object can no
@@ -233,7 +233,7 @@ freezing an object also prevents its prototype from being changed.
233
233
### Seal()
234
234
235
235
``` cpp
236
- void Napi::Object::Seal ()
236
+ void Napi::Object::Seal () const ;
237
237
```
238
238
239
239
The ` Napi::Object::Seal() ` method seals an object, preventing new properties
@@ -244,50 +244,29 @@ writable.
244
244
### operator\[\] ()
245
245
246
246
``` cpp
247
- Napi::PropertyLValue<std::string> Napi::Object::operator [] (const char * utf8name);
247
+ Napi::PropertyLValue<std::string> Napi::Object::operator [] (const char * utf8name) const ;
248
248
```
249
249
- ` [in] utf8name ` : UTF-8 encoded null-terminated property name.
250
250
251
251
Returns a [ ` Napi::Object::PropertyLValue ` ] ( propertylvalue.md ) as the named
252
252
property or sets the named property.
253
253
254
254
``` cpp
255
- Napi::PropertyLValue<std::string> Napi::Object::operator [] (const std::string& utf8name);
255
+ Napi::PropertyLValue<std::string> Napi::Object::operator [] (const std::string& utf8name) const ;
256
256
```
257
257
- ` [in] utf8name ` : UTF-8 encoded property name.
258
258
259
259
Returns a [ ` Napi::Object::PropertyLValue ` ] ( propertylvalue.md ) as the named
260
260
property or sets the named property.
261
261
262
262
``` cpp
263
- Napi::PropertyLValue<uint32_t > Napi::Object::operator [] (uint32_t index);
263
+ Napi::PropertyLValue<uint32_t > Napi::Object::operator [] (uint32_t index) const ;
264
264
```
265
265
- ` [in] index ` : Element index.
266
266
267
267
Returns a [ ` Napi::Object::PropertyLValue ` ] ( propertylvalue.md ) or sets an
268
268
indexed property or array element.
269
269
270
- ``` cpp
271
- Napi::Value Napi::Object::operator [] (const char * utf8name) const ;
272
- ```
273
- - ` [in] utf8name ` : UTF-8 encoded null-terminated property name.
274
-
275
- Returns the named property as a [ ` Napi::Value ` ] ( value.md ) .
276
-
277
- ``` cpp
278
- Napi::Value Napi::Object::operator [] (const std::string& utf8name) const ;
279
- ```
280
- - ` [in] utf8name ` : UTF-8 encoded property name.
281
-
282
- Returns the named property as a [ ` Napi::Value ` ] ( value.md ) .
283
-
284
- ``` cpp
285
- Napi::Value Napi::Object::operator [] (uint32_t index) const ;
286
- ```
287
- - ` [in] index ` : Element index.
288
-
289
- Returns an indexed property or array element as a [ ` Napi::Value ` ] ( value.md ) .
290
-
291
270
### begin()
292
271
293
272
``` cpp
0 commit comments