Skip to content

Commit 7c84e28

Browse files
authored
Add suggested for js_object (#13879)
<img width="754" height="506" alt="image" src="https://github.com/user-attachments/assets/48a249ad-a731-46f5-b51e-5bd2cef4ec4a" />
1 parent 9000d3b commit 7c84e28

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

distribution/lib/Standard/Base/0.0.0-dev/src/Data/Json.enso

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,13 +214,16 @@ type JS_Object
214214
## ---
215215
group: Logical
216216
icon: preparation
217+
suggested: 5
217218
---
218-
Returns True iff the objects contains the given `key`.
219+
Returns True if the object contains the given `key`.
219220
contains_key : Text -> Boolean
220221
contains_key self key:Text = self.object_node.has key
221222

222223
## ---
224+
group: Selections
223225
icon: parse3
226+
suggested: 3
224227
---
225228
Get a value for a key of the object, or a default value if that key is not
226229
present.
@@ -229,7 +232,7 @@ type JS_Object
229232
- `key`: The key to get.
230233
- `if_missing`: The value to return if the key is not found.
231234
@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
233236
get self key:Text ~if_missing=Nothing =
234237
if self.contains_key key . not then if_missing else
235238
child = self.object_node.get key
@@ -238,6 +241,7 @@ type JS_Object
238241
## ---
239242
group: Selections
240243
icon: parse3
244+
suggested: 2
241245
---
242246
Get a value for a key of the object.
243247
If the key is not found, throws a `No_Such_Key` error.
@@ -251,6 +255,7 @@ type JS_Object
251255
## ---
252256
group: Metadata
253257
icon: metadata
258+
suggested: 6
254259
---
255260
Get the keys of the object.
256261
field_names : Vector
@@ -286,6 +291,7 @@ type JS_Object
286291
## ---
287292
group: Metadata
288293
icon: metadata
294+
suggested: 7
289295
---
290296
Gets the number of keys in the object.
291297
length : Number
@@ -357,7 +363,7 @@ type JS_Object
357363
render self
358364

359365
## ---
360-
group: Conversions
366+
private: true
361367
icon: convert
362368
---
363369
Creates an Enso object from the JS_Object.
@@ -385,9 +391,11 @@ type JS_Object
385391
_ -> Error.throw (Illegal_Argument.Error "Unable to build a "+target_type.to_text+" cannot find unique constructor.")
386392

387393
## ---
394+
group: Values
388395
icon: edit
396+
suggested: 4
389397
---
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.
391399

392400
## Arguments
393401
- `key`: the name of the field to modify.

distribution/lib/Standard/Table/0.0.0-dev/src/Extensions/Table_Conversions.enso

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ Date_Range.to_table self name:Text=self.default_column_name =
5555
## ---
5656
group: Standard.Base.Conversions
5757
icon: convert
58+
suggested: 1
5859
---
5960
Converts this `JS_Object` into a `Table`.
6061

0 commit comments

Comments
 (0)