Lucee Array Extension

I have created an extension to add a few additional array functions to Lucee. I have implemented ArrayPop, ArrayShift and ArraySplice. The ArrayPop and ArrayShift functions are easy enough to implement just using simple CFML but instead of calling two functions to accomplish it I decided to make it part of the extension so you only have to call one function now. There is a release available on my Github page below. The functions seem pretty stable in my testing but I released it as beta until more people have used it.

If anyone thinks of other Array functions that could be useful please let me know and I can add them to this extension.

1 Like

I have always found _.indexBy / _.keyBy very useful in javascript

https://underscorejs.org/#indexBy
https://lodash.com/docs/4.17.10#keyBy

Those two functions are essentially the same right?

Yep, keyBy is the more common usage as lodash is super popular and it also feels more cfml-y

Hi,
I wanted to inform of the existence of the component Underscore.cfc

1 Like

There’s also CFCollection

2 Likes