1
0
mirror of https://github.com/MontFerret/ferret.git synced 2024-12-12 11:15:14 +02:00

#10 Added 'NewLib' function

This commit is contained in:
Tim Voronov 2018-10-07 17:58:22 -04:00
parent 0dfd58dc89
commit fa5a10925b
2 changed files with 12 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import (
"github.com/MontFerret/ferret/pkg/stdlib/arrays"
"github.com/MontFerret/ferret/pkg/stdlib/collections"
"github.com/MontFerret/ferret/pkg/stdlib/html"
"github.com/MontFerret/ferret/pkg/stdlib/objects"
"github.com/MontFerret/ferret/pkg/stdlib/strings"
"github.com/MontFerret/ferret/pkg/stdlib/types"
"github.com/MontFerret/ferret/pkg/stdlib/utils"
@ -23,6 +24,7 @@ func NewLib() map[string]core.Function {
add(strings.NewLib())
add(collections.NewLib())
add(arrays.NewLib())
add(objects.NewLib())
add(html.NewLib())
add(utils.NewLib())

10
pkg/stdlib/objects/lib.go Normal file
View File

@ -0,0 +1,10 @@
package objects
import "github.com/MontFerret/ferret/pkg/runtime/core"
func NewLib() map[string]core.Function {
return map[string]core.Function{
"HAS": Has,
"KEYS": Keys,
}
}