jsarrayext = javascript-style array extension for golang slice
This library lets you use Golang slices like JavaScript arrays by implementing the same methods. Generally, chaining methods, i.e. methods that don't modify the array itself and return the modified array, and some very common and useful methods are implemented.
Due to Golang language restrictions, optional parameters are not supported. Further, index is provided in callback functions while array not.
Implemented:
- concat()
- every()
- fill()
- filter()
- find()
- findIndex()
- forEach()
- includes()
- indexOf()
- lastIndexOf()
- map()
- reduce()
- reduceRight()
- reverse()
- some()
- sort()
Won't implement:
- entries(), keys(), values() since iterator is returned
- flat(), flatMap() due to experimental feature
- join()
- pop(), unshift() use append() instead
- push(), shift(), splice() see https://github.com/golang/go/wiki/SliceTricks
- slice()
- toLocalString()
- toSource()
- toString()
Maybe:
- copyWithin()
- join()