> Like isObject([]) returning true - arrays aren't objects in my mental model. Correct me if I am wrong, but Array factually are JS objects and "[] instanceof Object" is true. Fair enough if that does not fit your mental model, but I would not use any library that treats facts like opinions.
I agree with the author that it’s almost never what you want. But I agree with you that it’s the reality of the platform, ignoring it will cause its own problems. I’d surface the footgun rather than trying to pretend it’s not there: isNonArrayObject and isObjectOrArray, or something like that
Show HN: SuperUtilsPlus – A Modern Alternative to Lodash
31–40 of 88 posts
Re: Show HN: SuperUtilsPlus – A Modern Alternative to Lodash
#32I recommend https://remedajs.com/ - they're always making the types more accurate too. Like groupby has nonempty lists.
edit: the types on remeda look great though! If I were doing a backend-only NodeJS project, I'd be super tempted to test it out.
Re: Show HN: SuperUtilsPlus – A Modern Alternative to Lodash
#33Re: Show HN: SuperUtilsPlus – A Modern Alternative to Lodash
#34I recommend https://remedajs.com/ - they're always making the types more accurate too. Like groupby has nonempty lists.
Re: Show HN: SuperUtilsPlus – A Modern Alternative to Lodash
#35I made twitter post 3 or 4 years ago making fun of Lodash team for _still_ not shipping loadash 5 and they didn't like it very much. They started working on Lodash 5 in like 2015 and it still hasn't shipped. Guess we make our own now
Re: Show HN: SuperUtilsPlus – A Modern Alternative to Lodash
#36Re: Show HN: SuperUtilsPlus – A Modern Alternative to Lodash
#37What I’d like is a utility library like this, but instead of it being an actual library, be it some utility that generates a single file with exports of the few functions I need. Even just something that would make copy pasting them easier. As in, I want actual zero dependencies, not even the library itself. The reason: I never want these to randomly update.
Couldn't you just pin a specific version dependency? My brain says there's some way to also pin to a hash, but that would require googling and I'm on mobile.
Re: Show HN: SuperUtilsPlus – A Modern Alternative to Lodash
#38Biggest pain point: wtf is lodash? I don’t care if it’s in your readme, but maybe tell us in your HN hype post
Re: Show HN: SuperUtilsPlus – A Modern Alternative to Lodash
#39Nice work! Reminds me of https://github.com/angus-c/just Suggestion: add more tests and run some benchmarks
Re: Show HN: SuperUtilsPlus – A Modern Alternative to Lodash
#40We use es-toolkit to replace Lodash - how would you compare your library? We just migrated a React app with around 500k LOC and this worked quite well and flawless.