Skip to content

regmish/sliceutils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slice Utils: Useful Array Methods (Inspired from JavaScript)

  • Length
  • Push
  • Pop
  • ForEach
  • Map
  • Filter
  • IndexOf
  • Includes
  • Sort
  • Concat
  • Every
  • Join
  • Reduce
  • Find
  • FindIndex
  • Fill
  • Slice
  • Reverse
  • Shift
  • Unshift
myArr := Array[int]{1, 2, 3, 4, 5}

myArr.Length()
myArr.Push(6)
el := myArr.Pop()
myArr.ForEach(func(el int, idx int, arr Array) {
    fmt.PrintLn(el)
})

myArr.Filter(func(el int, idx int, arr Array) {
    return el > 3
})
..
..
and many many more...

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages