CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-lodash-kebabcase

The lodash method kebabCase exported as a standalone Node.js module for converting strings to kebab-case format

Overall
score

68%

Evaluation68%

1.08x

Agent success when using this tile

Overview
Eval results
Files

task.mdevals/scenario-8/

Score Normalizer

Create a small utility for working with numeric score data. It should make it easy to aggregate round scores, create milestone checkpoints, and apply bonus points without mutating inputs.

Capabilities

Summarize round scores

  • It returns total, average, boundedTotal, and roundedAverage for an array of numeric rounds, rounding the average to the provided decimal precision. @test
  • When the summed score exceeds a maximum boundary, boundedTotal stays at that maximum; when it falls below a minimum boundary, it stays at that minimum. @test Boundaries are inclusive, and precision is a non-negative integer representing decimal places.

Generate milestones

  • It builds an ascending list of numeric checkpoints from a start to an end value (inclusive when divisible) using a positive step, stopping before it would pass the end. @test

Apply random bonuses

  • Given base scores and a bonus range, it returns a new list with an added integer bonus per entry inside the range (inclusive), using an optional randomizer function for deterministic tests and leaving the original array untouched. @test

Implementation

@generates

API

/**
 * Summarize numeric round scores with bounds and rounding.
 * @param {number[]} rounds
 * @param {{ minTotal: number, maxTotal: number, precision: number }} options
 * @returns {{ total: number, average: number, boundedTotal: number, roundedAverage: number }}
 */
function summarizeRounds(rounds, options) {}

/**
 * Build milestone checkpoints between start and end using a positive step.
 * @param {number} start
 * @param {number} end
 * @param {number} step
 * @returns {number[]}
 */
function buildMilestones(start, end, step) {}

/**
 * Apply an in-range random integer bonus to each score.
 * @param {number[]} scores
 * @param {{ min: number, max: number }} bonusRange
 * @param {() => number} [randomizer]
 * @returns {number[]}
 */
function applyBonus(scores, bonusRange, randomizer) {}

module.exports = {
  summarizeRounds,
  buildMilestones,
  applyBonus,
};

Dependencies { .dependencies }

lodash { .dependency }

Provides numeric helpers for aggregation, bounding, randomization, and sequence generation.

Install with Tessl CLI

npx tessl i tessl/npm-lodash-kebabcase

tile.json