Array.reduce() method applies a function against an accumulator and each element in the array (from left to right) to reduce it to a single value.
npm install @extendscript/aes.patch.array.reduce
You can test the code against a range of targets:
npm run test target-1 target-2
We keep a log of test results