Documentation ¶
Index ¶
- func Has(_ context.Context, args ...core.Value) (core.Value, error)
- func KeepKeys(_ 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 MergeRecursive(_ context.Context, args ...core.Value) (core.Value, error)
- func RegisterLib(ns core.Namespace) error
- func Values(_ context.Context, args ...core.Value) (core.Value, error)
- func Zip(_ context.Context, args ...core.Value) (core.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Has ¶
HAS returns the value stored by the given key. @param {String} key - The key name string. @return {Boolean} - True if the key exists else false.
func KeepKeys ¶ added in v0.7.0
KEEP_KEYS returns a new object with only given keys. @param {Object} obj - Source object. @param {String, repeated} keys - Keys that need to be kept. @return {Object} - New Object with only given keys.
func Keys ¶
KEYS returns string array of object's keys @param {Object} obj - The object whose keys you want to extract @param {Boolean} [sort=False] - If sort is true, then the returned keys will be sorted. @return {String[]} - Array that contains object keys.
func Merge ¶
MERGE merge the given objects into a single object. @param {Object, repeated} objects - Objects to merge. @return {Object} - Object created by merging.
func MergeRecursive ¶ added in v0.4.0
MERGE_RECURSIVE recursively merge the given objects into a single object. @param {Objects, repeated} objects - Objects to merge. @return {Object} - Object created by merging.
func RegisterLib ¶ added in v0.8.0
func Values ¶ added in v0.4.0
VALUES return the attribute values of the object as an array. @param {Object} object - Target object. @return {Any[]} - Values of document returned in any order.
func Zip ¶
ZIP returns an object assembled from the separate parameters keys and values. Keys and values must be arrays and have the same length. @param {String[]} keys - An array of strings, to be used as key names in the result. @param {Object[]} values - An array of core.Value, to be used as key values. @return {Object} - An object with the keys and values assembled.
Types ¶
This section is empty.