diff --git a/dict-iterator.go b/dict-iterator.go index 0a1ef43..237b500 100644 --- a/dict-iterator.go +++ b/dict-iterator.go @@ -70,6 +70,13 @@ func (it *DictIterator) makeKeys(m map[any]any, sort sortType) { } } +// NewDictIterator creates a new DictIterator for the given dict.DictType and optional arguments. +// The first argument can be a string specifying the sort type ("asc", "desc", "none", or "default"). +// The second argument can be a string specifying the iteration mode ("keys", "values", "items", or "default"). +func NewDictIteratorA(dict *dict.DictType, args ...any) (it *DictIterator, err error) { + return NewDictIterator(dict, args) +} + func NewDictIterator(dict *dict.DictType, args []any) (it *DictIterator, err error) { var sortType = sortTypeNone var s string