Enhance: elastic.lua getHeadersReverse/getHeaders could share code
Open
- Dominant language
- JavaScript
- Stars
- 80
- Forks
- 32
- PR merge metrics
- No merged PRs in 30d
Description
The code for getHeadersReverse/getHeaders is basically the same apart from the sort field (but see #146) and the call to table.insert()
The code could be shared by using a common function that accepted a direction parameter.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in elastic.lua by comparing getHeadersReverse and getHeaders, especially their sort-field handling and table.insert() calls. Extract the shared behavior while preserving the differing direction and insertion behavior, then verify that both functions still return the expected headers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- search
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100