Documentation
¶
Index ¶
- func Entries(ctx context.Context, arg runtime.Value) (runtime.Value, error)
- func FromEntries(ctx context.Context, arg runtime.Value) (runtime.Value, error)
- func HasKey(ctx context.Context, arg1, arg2 runtime.Value) (runtime.Value, error)
- func KeepKeys(ctx context.Context, args ...runtime.Value) (runtime.Value, error)
- func KeepKeysMutable(ctx context.Context, args ...runtime.Value) (runtime.Value, error)
- func Keys(ctx context.Context, arg runtime.Value) (runtime.Value, error)
- func Merge(ctx context.Context, args ...runtime.Value) (runtime.Value, error)
- func MergeDeep(ctx context.Context, args ...runtime.Value) (runtime.Value, error)
- func MergeDeepMutable(ctx context.Context, args ...runtime.Value) (runtime.Value, error)
- func MergeMutable(ctx context.Context, args ...runtime.Value) (runtime.Value, error)
- func OmitKeys(ctx context.Context, args ...runtime.Value) (runtime.Value, error)
- func OmitKeysMutable(ctx context.Context, args ...runtime.Value) (runtime.Value, error)
- func RegisterLib(ns runtime.Namespace)
- func Values(ctx context.Context, arg runtime.Value) (runtime.Value, error)
- func Zip(ctx context.Context, arg1, arg2 runtime.Value) (runtime.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Entries ¶
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. @param value {Map} Map whose entries are returned. @return {Any[][]} Independent two-item lists containing a String key and its cloned or copied value.
func FromEntries ¶
FromEntries consumes an iterable of two-item, indexed, measurable pairs once. Keys must be strings. Duplicate keys use the last value encountered. @param entries {Iterable} Entries containing a String key and any value. @return {Map} Independent object containing cloned or copied entry values.
func HasKey ¶
HasKey checks key existence, including keys whose value is none. @param object {Map} Object or map to inspect. @param key {String} The key name string. @return {Boolean} True if the key exists else false.
func KeepKeys ¶
KeepKeys clones the source and retains only the requested keys. Missing and repeated keys are ignored. @param value {Map} Source map. @param keys {String|String[], repeated} Variadic keys, or one list of keys; an empty list keeps nothing. @return {Map} Independent map containing only selected keys.
func KeepKeysMutable ¶
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. @param target {Map} Map to mutate. @param keys {String|String[], repeated} Variadic keys, or one list of keys; an empty list keeps nothing. @return {Map} The original target containing only selected keys.
func Keys ¶
Keys returns an independent list of map keys in unspecified order. Use sorted(object::keys(value)) when ordering is required. @param value {Map} Map whose keys are returned. @return {String[]} Independent list of keys in unspecified order.
func Merge ¶
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. @param values {Map|Map[], repeated} Variadic maps, or one list of maps. @return {Map} Shallow merge with cloned or copied values.
func MergeDeep ¶
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. @param values {Map|Map[], repeated} Variadic maps, or one list of maps. @return {Map} Deep merge with cloned or copied values.
func MergeDeepMutable ¶
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. @param target {Map} Map to mutate; its top-level aliases observe changes. @param sources {Map|Map[], repeated} Zero or more maps, or one list of maps. @return {Map} The original target with independently merged nested branches.
func MergeMutable ¶
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. @param target {Map} Map to mutate. @param sources {Map|Map[], repeated} Zero or more maps, or one list of maps. @return {Map} The original mutated target.
func OmitKeys ¶
OmitKeys clones the source and removes the requested keys. Missing and repeated keys are ignored. @param value {Map} Source map. @param keys {String|String[], repeated} Variadic keys, or one list of keys; an empty list omits nothing. @return {Map} Independent map without selected keys.
func OmitKeysMutable ¶
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. @param target {Map} Map to mutate. @param keys {String|String[], repeated} Variadic keys, or one list of keys; an empty list omits nothing. @return {Map} The original target without selected keys.
func RegisterLib ¶
RegisterLib registers object functions, explicit object::mut operations, and deprecated globals. @namespace object
func Values ¶
Values returns cloned or copied map values in unspecified order. @param value {Map} Map whose values are returned. @return {Any[]} Independent list of values, following each value's clone or copy contract.
func Zip ¶
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. @param keys {String[]} List of object keys. @param values {Any[]} Parallel list of values. @return {Map} Independent object containing cloned or copied values.
Types ¶
This section is empty.