Live data from Hacker News

Show HN: SuperUtilsPlus – A Modern Alternative to Lodash

github.com

31–40 of 88 posts

Re: Show HN: SuperUtilsPlus – A Modern Alternative to Lodash

#31
post #7

> 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

your option is a bit more verbose but definitely more clear. confusing the underlying definitions of the language itself will lead to problems later.

Re: Show HN: SuperUtilsPlus – A Modern Alternative to Lodash

#32
post #19

I recommend https://remedajs.com/ - they're always making the types more accurate too. Like groupby has nonempty lists.

The types look great on remeda, but one thing that looks intriguing about SuperUtilsPlus is the focus on being tree-shakeable. Lodash's lack of tree-shake-ability is a drawback to using lodash on the frontend.

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

#37
post #23
post #21

What 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.

The problem is that even if you pin to a version, at some point you’ll need to update node, typescript, or some other package, and then if this package doesn’t update, then you may have to migrate from it to something else. While js tries to enforce backwards compatibility, and npm, etc. help with the complex landscape, in practice with node, typescript, etc., even with LLMs helping, it can be a pita and hours or days of work to update at times. It’s just not worth it for things you could’ve just implemented yourself. There are exceptions to this, though.

Re: Show HN: SuperUtilsPlus – A Modern Alternative to Lodash

#38

Biggest pain point: wtf is lodash? I don’t care if it’s in your readme, but maybe tell us in your HN hype post

lodash is extremely common knowledge in the js/web world. you’re asking a chemist to explain atoms before sharing their big discovery

Re: Show HN: SuperUtilsPlus – A Modern Alternative to Lodash

#39

Nice work! Reminds me of https://github.com/angus-c/just Suggestion: add more tests and run some benchmarks

Thanks for this! I've already started adding more tests. I ran some benchmarks and they were really impressive. I will get it out in the next release

Re: Show HN: SuperUtilsPlus – A Modern Alternative to Lodash

#40
post #14

We 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.

I've not used es-toolkit but from what I see you get lower bundle size, typescript support and a better performance with our library. I will be releasing the the benchmark soon enough so do watch the repository if you can
Post reply on HN