@@ -214,13 +214,16 @@ type JS_Object
214
214
## ---
215
215
group: Logical
216
216
icon: preparation
217
+ suggested: 5
217
218
---
218
- Returns True iff the objects contains the given `key`.
219
+ Returns True if the object contains the given `key`.
219
220
contains_key : Text -> Boolean
220
221
contains_key self key:Text = self.object_node.has key
221
222
222
223
## ---
224
+ group: Selections
223
225
icon: parse3
226
+ suggested: 3
224
227
---
225
228
Get a value for a key of the object, or a default value if that key is not
226
229
present.
@@ -229,7 +232,7 @@ type JS_Object
229
232
- `key`: The key to get.
230
233
- `if_missing`: The value to return if the key is not found.
231
234
@key make_field_name_selector
232
- get : Text -> Any -> Nothing | Boolean | Number | Text | Vector | JS_Object
235
+ get : Text -> Any -> JS_Object | Boolean | Number | Nothing | Text | Vector
233
236
get self key:Text ~if_missing=Nothing =
234
237
if self.contains_key key . not then if_missing else
235
238
child = self.object_node.get key
@@ -238,6 +241,7 @@ type JS_Object
238
241
## ---
239
242
group: Selections
240
243
icon: parse3
244
+ suggested: 2
241
245
---
242
246
Get a value for a key of the object.
243
247
If the key is not found, throws a `No_Such_Key` error.
@@ -251,6 +255,7 @@ type JS_Object
251
255
## ---
252
256
group: Metadata
253
257
icon: metadata
258
+ suggested: 6
254
259
---
255
260
Get the keys of the object.
256
261
field_names : Vector
@@ -286,6 +291,7 @@ type JS_Object
286
291
## ---
287
292
group: Metadata
288
293
icon: metadata
294
+ suggested: 7
289
295
---
290
296
Gets the number of keys in the object.
291
297
length : Number
@@ -357,7 +363,7 @@ type JS_Object
357
363
render self
358
364
359
365
## ---
360
- group: Conversions
366
+ private: true
361
367
icon: convert
362
368
---
363
369
Creates an Enso object from the JS_Object.
@@ -385,9 +391,11 @@ type JS_Object
385
391
_ -> Error.throw (Illegal_Argument.Error "Unable to build a "+target_type.to_text+" cannot find unique constructor.")
386
392
387
393
## ---
394
+ group: Values
388
395
icon: edit
396
+ suggested: 4
389
397
---
390
- Modify a field of a JSON object, returning a new updated object.
398
+ Modify a field of the object, returning a new updated object.
391
399
392
400
## Arguments
393
401
- `key`: the name of the field to modify.
0 commit comments