Lucee Array Extension


#1

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.


#2

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

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


#3

Those two functions are essentially the same right?


#4

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


#5

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


#6

There’s also CFCollection