Discover Packages
github.com/baking-code/godash
filter
package
Version:
v0.1.1
Opens a new window with list of versions in this module.
Published: Dec 4, 2023
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
func Filter[T interface{}](collection []T, predicate func(e T, index int , collection []T) bool ) []T
Iterates over elements of collection, returning an array of all elements predicate returns truthy for. The predicate is invoked with three arguments: (value, index|key, collection).
Note: this method returns a new array.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.