Converts HTML entities to their corresponding characters in a string
Overall
score
85%
Evaluation — 85%
↑ 1.39xAgent success when using this tile
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.
Install with Tessl CLI
npx tessl i tessl/npm-lodash-unescapedocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10