tessl install tessl/npm-lodash-unescape@4.0.0Converts HTML entities to their corresponding characters in a string
Agent Success
Agent success rate when using this tile
85%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.39x
Baseline
Agent success rate without this tile
61%
A utility library for merging parallel arrays element-by-element using custom operations.
Merges multiple arrays by applying a custom function to corresponding elements from each array at the same position.
[1, 2], [3, 4], and [5, 6] with a sum operation (a, b, c) => a + b + c, returns [9, 12] @test['a', 'b'] and ['c', 'd'] with a concatenation operation (x, y) => x + y, returns ['ac', 'bd'] @test[] and [] with any operation, returns an empty array [] @testTakes an array where each element is itself an array, and applies a function across corresponding positions to produce aggregated results.
[[1, 3, 5], [2, 4, 6]] with a sum operation (...nums) => nums.reduce((a, b) => a + b, 0), returns [9, 12] @test[] with any operation, returns an empty array [] @test@generates
/**
* Merges multiple arrays element-by-element using a custom operation.
* Takes N arrays plus a function, and applies the function to elements
* at the same index across all arrays.
*
* @param {...Array} arrays - Two or more arrays to merge
* @param {Function} operation - Function that takes N arguments (one from each array) and returns a single value
* @returns {Array} Array of merged values
*/
function mergeArrays(...arrays) {
// IMPLEMENTATION HERE
}
/**
* Reverses a merge operation by applying a function across corresponding
* positions in grouped data. Takes an array of arrays and applies the
* function to elements at each position.
*
* @param {Array} grouped - Array where each element is an array of values
* @param {Function} operation - Function that receives all values at a position and returns a single result
* @returns {Array} Array of aggregated results, one per position
*/
function unmergeGrouped(grouped, operation) {
// IMPLEMENTATION HERE
}
module.exports = {
mergeArrays,
unmergeGrouped,
};Provides array manipulation utilities including element-wise combination and splitting operations.