QuickBEAM.VM.ObjectModel.Copy (QuickBEAM v0.10.9)

Copy Markdown View Source

Object spread and property copying: append_spread, copy_data_properties, and array/iterator flattening.

Summary

Functions

Appends values from a spread source into an array-like target and returns the next index.

Copies enumerable string properties from a source object to a target object.

Returns enumerable property keys in JavaScript enumeration order.

Returns enumerable own string properties as a map of property names to values.

Converts a spread source value into the list of values to append.

Converts a spread target value into its current list representation.

Functions

append_spread(arr, idx, obj)

Appends values from a spread source into an array-like target and returns the next index.

copy_data_properties(target, source, exclude \\ nil)

Copies enumerable string properties from a source object to a target object.

enumerable_keys(obj)

Returns enumerable property keys in JavaScript enumeration order.

enumerable_string_props(source_obj)

Returns enumerable own string properties as a map of property names to values.

spread_source_to_list(list)

Converts a spread source value into the list of values to append.

spread_target_to_list(list)

Converts a spread target value into its current list representation.