developit / developit/jasonformat.com
I have no Twitter but I'd like to comment:
- Dominant language
- JavaScript
- Stars
- 20
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
Hi Jason,
Apologies for (mis)using github issues as a place for comments (see subject line)
I just read your blogpost: [Quick tip: reusable Array search predicates](https://jasonformat.com/reusable-array-search-predicates). In the past I've achieved a similar effect (in terms of developer experience) by having a function that returns a function eg.
```
const byId = (value) => {
return (element) => {
element.id == value;
}
}
myArray.filter( byId(12) );
```
Of course each time I'm creating a new function for the predicate so I'm not really reusing it but it feels that way (as I say, dev experience...). I wonder if you have any insight into how the two approaches might differ, performance or other-wise.
Thanks for writing your blog, it's always interesting.
Tom
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue is a comment about the linked blog post, Quick tip: reusable Array search predicates, rather than a repository change. Read that post and the issue context first; there is no named file, test, entry point, or concrete definition of done to guide implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- content
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 10/100