mirror of
https://github.com/rjNemo/underscore
synced 2026-06-06 02:26:42 +00:00
* feat: chain filter map reduce simple Type * docs: chain documentation Co-authored-by: Ruidy <rnemausat@newstore.com>
11 lines
219 B
Go
11 lines
219 B
Go
package underscore
|
|
|
|
// Contains returns true if the value is present in the slice
|
|
func Contains[T numbers](values []T, value T) bool {
|
|
for _, v := range values {
|
|
if v == value {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|