pipe

package
v0.3.37 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Any

func Any(data interface{}, fn func(v interface{}) bool) bool

Any input array

func Each

func Each(data interface{}, fn interface{})

Each input array

func Every

func Every(data interface{}, fn func(v interface{}) bool) bool

Every input array

Types

type IPipe

type IPipe interface {
	SortBy(swap interface{}) *_func

	Pipe(fn interface{}) *_func

	Map(fn interface{}) *_func

	Reduce(fn interface{}) *_func

	Any(fn func(v interface{}) bool) bool
	Every(fn func(v interface{}) bool) bool
	Each(fn interface{})

	FilterNil() *_func
	Filter(fn interface{}) *_func

	MustNotNil()

	ToString() string
	ToData(fn ...interface{}) interface{}
	P(tags ...string)
}

IPipe interface

func ArrayOf

func ArrayOf(ps interface{}) IPipe

ArrayOf input array

func Filter

func Filter(data interface{}, fn interface{}) IPipe

Filter input array

func FilterNil

func FilterNil(data interface{}) IPipe

FilterNil input array

func Map

func Map(data interface{}, fn interface{}) IPipe

Map input array

func Pipe

func Pipe(data interface{}, fn interface{}) IPipe

Pipe input array

func Reduce

func Reduce(data interface{}, code string) IPipe

Reduce input array

func SliceOf

func SliceOf(ps ...interface{}) IPipe

SliceOf input slice

func SortBy

func SortBy(data interface{}, swap interface{}) IPipe

SortBy input array

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL