mirror of
https://github.com/MontFerret/ferret.git
synced 2025-11-23 21:54:45 +02:00
Added object 'KEEP' function (#88)
* add unit tests for KEEP function * added KEEP function * added doc for KEYS function * addded isEqualObjects function to objects tests
This commit is contained in:
@@ -8,6 +8,12 @@ import (
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
)
|
||||
|
||||
/*
|
||||
* 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 Keys(_ context.Context, args ...core.Value) (core.Value, error) {
|
||||
err := core.ValidateArgs(args, 1, 2)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user