The lodash method kebabCase exported as a standalone Node.js module for converting strings to kebab-case format
Overall
score
68%
Evaluation — 68%
↑ 1.08xAgent success when using this tile
Utilities for reading, updating, and reshaping nested configuration objects via string-based paths while preserving immutability.
{ "ui": { "theme": { "primary": "#123456" } } }, reading ui.theme.primary returns #123456, while reading ui.layout.mode returns the provided fallback "light". @testfeatures.analytics.enabled to true on { "features": {} } returns a new object with the nested branch created, and the original input remains unchanged. @test[{ "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["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@generates
/**
* 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,
};Utility helpers for object and path manipulation.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-lodash-kebabcasedocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10