https://github.com/gwleuverink/collections
Collections implementation with generators
https://github.com/gwleuverink/collections
hacktoberfest
Last synced: 3 months ago
JSON representation
Collections implementation with generators
- Host: GitHub
- URL: https://github.com/gwleuverink/collections
- Owner: gwleuverink
- License: mit
- Created: 2021-09-15T15:27:32.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-31T14:31:48.000Z (over 3 years ago)
- Last Synced: 2025-01-27T22:54:03.021Z (4 months ago)
- Topics: hacktoberfest
- Language: PHP
- Homepage:
- Size: 51.8 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Collections
Collections implementation with generators. This thing is just for practice## How to use
Read the tests## Scripts
`composer fix`: Run php-cs-fixer`composer test`: Run test suite
`composer coverage`: Generate coverage report
`composer analyze`: Generate static analysis report
## Roadmap
### Critical
- [ ] Refactor to generators
- [ ] Rust bindings? (@MichielBier)### The basics & too lazy to think of a category
- [x] each
- [x] reduce
- [ ] tap
- [x] sum
- [ ] average/avg
- [ ] contains
- [x] first
- [x] last
- [ ] merge
- [ ] isEmpty (refactor empty conditionals afterwards)
- [x] every
### Filtering
- [ ] filter
- [ ] except
- [ ] only
### Sorting
- [ ] sort
- [ ] sortBy
- [ ] sortByDesc
### Transforming
- [x] map
- [ ] flatMap
- [ ] mapWithKeys
- [ ] mapSpread
- [x] count
- [ ] keys
- [ ] values
### Representations
- [ ] all/toArray
- [ ] toJson
### Conditionals
- [x] when
- [x] whenEmpty
- [x] whenNotEmpty
- [x] unless
- [x] unlessEmpty
- [x] unlessNotEmpty