Documentation ¶
Index ¶
- func Has(_ context.Context, args ...core.Value) (core.Value, error)
- func Keep(_ context.Context, args ...core.Value) (core.Value, error)
- func Keys(_ context.Context, args ...core.Value) (core.Value, error)
- func Merge(_ context.Context, args ...core.Value) (core.Value, error)
- func NewLib() map[string]core.Function
- func Zip(_ context.Context, args ...core.Value) (core.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Has ¶
* Returns the value stored by the given key. * @params (String) - The key name string. * @returns (Boolean) - True if the key exists else false.
func Keep ¶
* Returns a new object with only given keys. * @params src (Object) - source object. * @params keys (Array Of String OR Strings) - keys that need to be keeped. * @returns (Object) - New Object with only given keys.
func Keys ¶
* Returns string array of object's keys * @params obj (Object) - The object whose keys you want to extract * @params sort (Boolean, optional) - If sort is true, then the returned keys will be sorted. * @returns (Array of String) - Array that contains object keys.
func Merge ¶
* Merge the given objects into a single object. * @params objs (Array Of Object OR Objects) - objects to merge. * @returns (Object) - Object created by merging.
func Zip ¶
* Returns an object assembled from the separate parameters keys and values. * Keys and values must be arrays and have the same length. * @params keys (Array of Strings) - an array of strings, to be used as key names in the result. * @params values (Array of Objects) - an array of core.Value, to be used as key values. * @returns (Object) - an object with the keys and values assembled.
Types ¶
This section is empty.