arr icon indicating copy to clipboard operation
arr copied to clipboard

Additional Convenience methods?

Open lukeed opened this issue 8 years ago • 8 comments
trafficstars

Look thru other collections, see if there are methods that can be greatly improved... perhaps pluck?

Would be adding to existing convenience methods: unique, flatten

lukeed avatar Jul 09 '17 00:07 lukeed

As per your README, you're providing Array.prototype fast alternative. Goal changed?

thangngoc89 avatar Jul 09 '17 00:07 thangngoc89

Not sure if I understand what you mean?

I'm still doing prototype methods. But I also have some additional "helper" methods. For now, I have unique and flatten because they're faster than alternatives. This issue is to potentially add more helpers.

lukeed avatar Jul 09 '17 01:07 lukeed

Ah Ok. Some high performance helpers out of the box is great for DX

thangngoc89 avatar Jul 09 '17 01:07 thangngoc89

Yeah, I think so! Primary focus is on the prototype methods, but some extras won't hurt 😉

Disclosure: Not sure if you saw, but most of these methods are only faster than native on Node 6 and below. I'm waiting until I return to my main machine before releasing official metrics.

lukeed avatar Jul 09 '17 01:07 lukeed

Yes, I saw the bench and your mentions. I always bench everything before introducing it to my application. For instance: map is actually faster on Node 8

thangngoc89 avatar Jul 09 '17 02:07 thangngoc89

Yup! That's fine with me too. Would much rather rely on natives, but not ideal for browsers and older node versions.

lukeed avatar Jul 09 '17 02:07 lukeed

pluck would be nice.

developit avatar Apr 18 '18 17:04 developit

Object pluck? I was planning on doing a similar set of modules for objects methods. Can't remember if I have the npm org already

lukeed avatar Apr 18 '18 17:04 lukeed