Object Utility
Object value operations. No hidden external Service communication.
Contract Object · 1.0.0-draft.1
Functions
has
Direct property presence.
| Argument | Type | Required | Default |
|---|---|---|---|
| object | core.object | Yes | — |
| key | core.string | Yes | — |
Returns: core.boolean
get
Nested dot-path lookup with fallback for missing paths, not explicit null.
| Argument | Type | Required | Default |
|---|---|---|---|
| object | core.object | Yes | — |
| path | core.string | Yes | — |
| fallback | core.data? | No | null |
Returns: core.data
keys
Own keys in insertion order.
| Argument | Type | Required | Default |
|---|---|---|---|
| object | core.object | Yes | — |
Returns: array<core.string>
remove
remove one direct local property.
| Argument | Type | Required | Default |
|---|---|---|---|
| object | core.object | Yes | — |
| key | core.string | Yes | — |
Returns: core.void
Statement Only · No Return Value
copy
Deep copy data; reject cyclic data and handles.
| Argument | Type | Required | Default |
|---|---|---|---|
| value | core.data | Yes | — |
Returns: core.data
equal
Structural equality of data; object key order ignored, array order significant.
| Argument | Type | Required | Default |
|---|---|---|---|
| left | core.data | Yes | — |
| right | core.data | Yes | — |
Returns: core.boolean
parse
Data read from its text representation; invalid text and duplicate property names fail.
| Argument | Type | Required | Default |
|---|---|---|---|
| text | core.string | Yes | — |
Returns: core.data
asString
Text representation of data; preserves nulls and numeric digits, rejects handles and cycles. Durations become ISO-8601 elapsed-duration strings; nested bytes become Base64 strings.
| Argument | Type | Required | Default |
|---|---|---|---|
| value | core.data | Yes | — |
| indent | core.integer | No | 0 |
Returns: core.string
Behavior
- Objects contain named data properties. Missing properties differ from explicit null. get uses dot paths; direct indexing accesses a key containing dots.
- copy is a deep data copy; equal is structural and ignores object key order. remove mutates one direct property and returns no value.
- parse accepts strict JSON data and rejects duplicate property names. It preserves integer and decimal digits. asString preserves nulls and digits and rejects handles and cycles.
- Dates and datetimes serialize as ISO strings; durations as ISO elapsed-duration strings; nested bytes as Base64. Parsing does not infer dates or bytes without an explicit typed contract.