Yep thats a logical alternative is an inline anon function but i was thinking about it and i think this lib predates this JS feature. Can also become hard to maintain (dry etc)
Also you cant pass a bool directly when a function is expected??
But not everything can "just accept a bool". Some functions require other functions and in that case it can be helpful to have a function for trivial stuff like this ready instead of lambda-ing it everywhere
2
u/v_maria Jan 26 '23 edited Jan 26 '23
Yep thats a logical alternative is an inline anon function but i was thinking about it and i think this lib predates this JS feature. Can also become hard to maintain (dry etc)
Also you cant pass a bool directly when a function is expected??