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 searching and filtering user data collections.
@generates
/**
* Finds a user by their ID in an array of user objects.
*
* @param {Array} users - Array of user objects
* @param {number} userId - The ID to search for
* @returns {Object|undefined} The user object if found, undefined otherwise
*/
function findUserById(users, userId) {
// IMPLEMENTATION HERE
}
/**
* Finds the first user matching a custom predicate function.
*
* @param {Array} users - Array of user objects
* @param {Function} predicate - Function that returns true for matching user
* @returns {Object|undefined} The first matching user object if found, undefined otherwise
*/
function findUserByPredicate(users, predicate) {
// IMPLEMENTATION HERE
}
/**
* Checks if a user ID exists in an array of user IDs.
*
* @param {Array} userIds - Array of user IDs
* @param {number} searchId - The ID to check for
* @returns {boolean} True if the ID exists, false otherwise
*/
function userExists(userIds, searchId) {
// IMPLEMENTATION HERE
}
/**
* Gets the index position of a user ID in an array.
*
* @param {Array} userIds - Array of user IDs
* @param {number} searchId - The ID to find the position of
* @returns {number} The index position if found, -1 otherwise
*/
function getUserPosition(userIds, searchId) {
// IMPLEMENTATION HERE
}
module.exports = {
findUserById,
findUserByPredicate,
userExists,
getUserPosition,
};Provides utility functions for array searching and manipulation.