View all results

Objects

Functions for creating, transforming, querying, and modifying objects.

has

2-parameter signature

has(object, key)

Deprecated.

Use object::has_key instead.

has checks key existence, including keys whose value is none.

Parameters
  • objectMapObject or map to inspect.
  • keyStringThe key name string.
Returns
BooleanTrue if the key exists else false.

keep_keys

Variadic signature

keep_keys(value, keys...)

Deprecated.

Use object::keep_keys instead.

keep_keys clones the source and retains only the requested keys.
Missing and repeated keys are ignored.

Parameters
  • valueMapSource map.
  • keysString | String[], repeatedVariadic keys, or one list of keys; an empty list keeps nothing.
Signature
Variadic
Returns
MapIndependent map containing only selected keys.

keys

1-parameter signature

keys(value)

Deprecated.

Use object::keys instead.

keys returns an independent list of map keys in unspecified order.

Parameters
  • valueMapMap whose keys are returned.
Returns
String[]Independent list of keys in unspecified order.

merge

Variadic signature

merge(values...)

Deprecated.

Use object::merge instead.

merge copies maps into an independent destination; later values replace earlier values.

Parameters
  • valuesMap | Map[], repeatedVariadic maps, or one list of maps.
Signature
Variadic
Returns
MapShallow merge with cloned or copied values.

merge_recursive

Variadic signature

merge_recursive(values...)

Deprecated.

Use object::merge_deep instead.

merge_recursive copies maps into an independent destination, merging nested maps recursively.
Arrays, scalars, and none are replaced by later values.

Parameters
  • valuesMap | Map[], repeatedVariadic maps, or one list of maps.
Signature
Variadic
Returns
MapDeep merge with cloned or copied values.

values

1-parameter signature

values(value)

Deprecated.

Use object::values instead.

values returns cloned or copied map values in unspecified order.

Parameters
  • valueMapMap whose values are returned.
Returns
Any[]Independent list of values, following each value's clone or copy contract.

zip

2-parameter signature

zip(keys, values)

Deprecated.

Use object::zip instead.

zip constructs an object from parallel key and value lists of equal length.
Keys must be strings. Duplicate keys use the last value in the input.

Parameters
  • keysString[]List of object keys.
  • valuesAny[]Parallel list of values.
Returns
MapIndependent object containing cloned or copied values.

object::entries

1-parameter signature

object::entries(value)

Entries returns associated key/value pairs from one map traversal.
Keys must be strings; only values follow their clone or copy contracts.
Ordering is unspecified.

Parameters
  • valueMapMap whose entries are returned.
Returns
Any[][]Independent two-item lists containing a String key and its cloned or copied value.

object::from_entries

1-parameter signature

object::from_entries(entries)

FromEntries consumes an iterable of two-item, indexed, measurable pairs once.
Keys must be strings. Duplicate keys use the last value encountered.

Parameters
  • entriesIterableEntries containing a String key and any value.
Returns
MapIndependent object containing cloned or copied entry values.

object::has_key

2-parameter signature

object::has_key(object, key)

HasKey checks key existence, including keys whose value is none.

Parameters
  • objectMapObject or map to inspect.
  • keyStringThe key name string.
Returns
BooleanTrue if the key exists else false.

object::keep_keys

Variadic signature

object::keep_keys(value, keys...)

KeepKeys clones the source and retains only the requested keys.
Missing and repeated keys are ignored.

Parameters
  • valueMapSource map.
  • keysString | String[], repeatedVariadic keys, or one list of keys; an empty list keeps nothing.
Signature
Variadic
Returns
MapIndependent map containing only selected keys.

object::keys

1-parameter signature

object::keys(value)

Keys returns an independent list of map keys in unspecified order.
Use sorted(object::keys(value)) when ordering is required.

Parameters
  • valueMapMap whose keys are returned.
Returns
String[]Independent list of keys in unspecified order.

object::merge

Variadic signature

object::merge(values...)

Merge copies maps into an independent destination; later values replace earlier values.
Successful factory construction transfers destination ownership to this call.
Population failure closes a closable destination and joins cleanup errors;
success transfers the result to the caller. Source maps remain borrowed.

Parameters
  • valuesMap | Map[], repeatedVariadic maps, or one list of maps.
Signature
Variadic
Returns
MapShallow merge with cloned or copied values.

object::merge_deep

Variadic signature

object::merge_deep(values...)

MergeDeep copies maps into an independent destination, merging nested maps recursively.
Arrays, scalars, and none are replaced by later values.
After successful factory construction, population failure closes a closable
destination and joins cleanup errors. Successful results transfer to the caller;
source maps remain borrowed. Failed construction is the factory's responsibility.

Parameters
  • valuesMap | Map[], repeatedVariadic maps, or one list of maps.
Signature
Variadic
Returns
MapDeep merge with cloned or copied values.

object::omit_keys

Variadic signature

object::omit_keys(value, keys...)

OmitKeys clones the source and removes the requested keys.
Missing and repeated keys are ignored.

Parameters
  • valueMapSource map.
  • keysString | String[], repeatedVariadic keys, or one list of keys; an empty list omits nothing.
Signature
Variadic
Returns
MapIndependent map without selected keys.

object::values

1-parameter signature

object::values(value)

Values returns cloned or copied map values in unspecified order.

Parameters
  • valueMapMap whose values are returned.
Returns
Any[]Independent list of values, following each value's clone or copy contract.

object::zip

2-parameter signature

object::zip(keys, values)

Zip constructs an object from parallel key and value lists of equal length.
Keys must be strings. Duplicate keys use the last value in the input.

Parameters
  • keysString[]List of object keys.
  • valuesAny[]Parallel list of values.
Returns
MapIndependent object containing cloned or copied values.

object::mut::keep_keys

Variadic signature

object::mut::keep_keys(target, keys...)

KeepKeysMutable removes unselected keys from the original target and returns it.
Retained values are untouched. Missing and repeated keys are ignored; errors
may leave earlier removals applied.

Parameters
  • targetMapMap to mutate.
  • keysString | String[], repeatedVariadic keys, or one list of keys; an empty list keeps nothing.
Signature
Variadic
Returns
MapThe original target containing only selected keys.

object::mut::merge

Variadic signature

object::mut::merge(target, sources...)

MergeMutable merges sources into the original target and returns that same map.
Incoming values are cloned or copied; later sources win. Errors may leave
earlier updates applied. A target without sources is returned unchanged.

Parameters
  • targetMapMap to mutate.
  • sourcesMap | Map[], repeatedZero or more maps, or one list of maps.
Signature
Variadic
Returns
MapThe original mutated target.

object::mut::merge_deep

Variadic signature

object::mut::merge_deep(target, sources...)

MergeDeepMutable deep merges sources into the original target, returning it.
Conflicting nested maps are cloned before modification so external nested
aliases remain unchanged. Arrays, scalars, and none are replaced. Errors may
leave earlier updates applied. A target without sources is returned unchanged.

Parameters
  • targetMapMap to mutate; its top-level aliases observe changes.
  • sourcesMap | Map[], repeatedZero or more maps, or one list of maps.
Signature
Variadic
Returns
MapThe original target with independently merged nested branches.

object::mut::omit_keys

Variadic signature

object::mut::omit_keys(target, keys...)

OmitKeysMutable removes selected keys from the original target and returns it.
Retained values are untouched. Missing and repeated keys are ignored; errors
may leave earlier removals applied.

Parameters
  • targetMapMap to mutate.
  • keysString | String[], repeatedVariadic keys, or one list of keys; an empty list omits nothing.
Signature
Variadic
Returns
MapThe original target without selected keys.