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-7/

Config Path Toolkit

Utilities for reading, updating, and reshaping nested configuration objects via string-based paths while preserving immutability.

Capabilities

Read nested values with fallback

  • Given { "ui": { "theme": { "primary": "#123456" } } }, reading ui.theme.primary returns #123456, while reading ui.layout.mode returns the provided fallback "light". @test

Set nested values immutably

  • Setting features.analytics.enabled to true on { "features": {} } returns a new object with the nested branch created, and the original input remains unchanged. @test

Apply ordered path updates

  • Applying updates [{ "type": "set", "path": "service.host", "value": "api.local" }, { "type": "set", "path": "service.ports[0]", "value": 8080 }, { "type": "delete", "path": "service.legacy" }] to { "service": { "legacy": true } } produces { "service": { "host": "api.local", "ports": [8080] } }. @test

Select subsets by paths

  • Selecting paths ["ui.theme.primary", "features.chat.enabled", "features.chat.region"] from { "ui": { "theme": { "primary": "#123456", "secondary": "#abcdef" } }, "features": { "chat": { "enabled": true, "region": "us-east" }, "billing": {} } } yields { "ui": { "theme": { "primary": "#123456" } }, "features": { "chat": { "enabled": true, "region": "us-east" } } }. @test

Implementation

@generates

API

/**
 * Reads a value from a nested object using a string path that supports dot and bracket notation (e.g., "a.b[0].c").
 * Returns the fallback when the path cannot be resolved.
 */
function readPath(source, path, fallback) {}

/**
 * Returns a new object with a value written at the given path (dot/bracket notation), without mutating the original source.
 * Creates intermediate objects or arrays as needed to satisfy the path.
 */
function writePath(source, path, value) {}

/**
 * Applies a sequence of ordered path operations to an object, returning a new object without mutating the input.
 * Each operation is an object of the form { type: "set" | "delete", path: string, value?: any } and is applied in the provided order.
 */
function applyOperations(source, operations) {}

/**
 * Builds a new object containing only the branches referenced by the provided list of paths, preserving their nested structure and ignoring missing paths.
 */
function selectPaths(source, paths) {}

module.exports = {
  readPath,
  writePath,
  applyOperations,
  selectPaths,
};

Dependencies { .dependencies }

lodash { .dependency }

Utility helpers for object and path manipulation.

@satisfied-by

Install with Tessl CLI

npx tessl i tessl/npm-lodash-kebabcase

tile.json