lodash 中文文档 lodash 中文文档
英文官网 (opens new window)
GitHub (opens new window)
英文官网 (opens new window)
GitHub (opens new window)
  • 简介
  • 数组
  • 集合
  • 函数
  • 语言
  • 数学
  • 数字
  • 对象
  • Seq
  • 字符串
  • 实用函数
  • Properties

Gubrak v2


Gubrak is Go functional utility library with syntactic sugar. It's like lodash, but for Go Programming language.

Installation


The latest version of gubrak is v2. Here are the available method to get this library.

Using go get from github, for Go Mod-based project:

  1. ``` sh
  2. go get -u github.com/novalagung/gubrak/v2
  3. ```

Using go get from github, for $GOPATH -based project:

  1. ``` sh
  2. go get -u github.com/novalagung/gubrak
  3. ```

Usage


Since this library is developed as go module, the versioning system used is the one from Go.

For Go Mod-based project:

  1. ``` go
  2. import gubrak "github.com/novalagung/gubrak/v2"
  3. ```

For $GOPATH -based project:

  1. ``` go
  2. import "github.com/novalagung/gubrak"
  3. ```

Documentation


Pkg Dev
Godoc

Hello World Example


APIs


Below are the list of available functions on gubrak:

Chunk • Compact • Concat • Count • Difference • Drop • DropRight • Each • EachRight • Fill • Filter • Find • FindIndex • FindLast • FindLastIndex • First • ForEach • ForEachRight • FromPairs • GroupBy • Head • Includes • IndexOf • Initial • Intersection • IsArray • IsBool • IsChannel • IsDate • IsEmpty • IsEmptyString • IsFloat • IsFunction • IsInt • IsMap • IsNil • IsNumeric • IsPointer • IsSlice • IsString • IsStructObject • IsTrue • IsUint • IsZeroNumber • Join • KeyBy • Last • LastIndexOf • Map • Now • Nth • OrderBy • Partition • Pull • PullAll • PullAt • RandomInt • RandomString • Reduce • Reject • Remove • Reverse • Sample • SampleSize • Shuffle • Size • SortBy • Tail • Take • TakeRight • Union • Uniq • Without

Test


  1. ``` sh
  2. go test -cover -race -v ./...
  3. ```

Contribution


Fork ➜ Create branch ➜ Commit ➜ Push ➜ Pull Requests

License


MIT License
Last Updated: 2023-05-15 20:35:46