objects

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Has

func Has(_ context.Context, args ...core.Value) (core.Value, error)

* 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

func Keep(_ context.Context, args ...core.Value) (core.Value, error)

* 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

func Keys(_ context.Context, args ...core.Value) (core.Value, error)

* 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

func Merge(_ context.Context, args ...core.Value) (core.Value, error)

* 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 NewLib

func NewLib() map[string]core.Function

func Zip

func Zip(_ context.Context, args ...core.Value) (core.Value, error)

* 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL