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

Utility Sandbox Builder

Create a configurable utility sandbox that extends the dependency without leaking changes to the default import or other sandboxes.

Capabilities

Isolated environments

  • Creating two sandboxes yields separate utility objects; adding a helper in one sandbox does not appear in the other or the default dependency import. @test

Chainable custom helpers

  • Custom helpers registered at sandbox creation are available for both direct calls and method-chaining wrappers returned by the sandboxed utilities. @test

Per-sandbox template rules

  • The sandbox can be initialized with custom interpolation delimiters for the dependency's template compiler, and those delimiters do not alter template behavior in other sandboxes. @test

Optional global aliasing

  • When a global alias is requested, the sandbox attaches its utilities to that global name and returns a function that restores any preexisting global value after use. @test

Implementation

@generates

API

export interface UtilityEnvOptions {
  helpers?: Record<string, (...args: any[]) => any>;
  templateDelimiters?: {
    interpolate?: RegExp | string;
    escape?: RegExp | string;
    evaluate?: RegExp | string;
  };
  globalName?: string;
}

export interface UtilityEnvironment {
  utils: any;
  restoreGlobal?: () => void;
}

/**
 * Builds an isolated utility environment using the dependency's extensibility features.
 * - `helpers` defines custom helpers to add to the sandbox.
 * - `templateDelimiters` customizes template compilation within this sandbox only.
 * - `globalName`, when provided, binds the sandbox utilities to that global name and
 *   returns a `restoreGlobal` function that puts the previous global value back.
 */
export function createUtilityEnvironment(options?: UtilityEnvOptions): UtilityEnvironment;

Dependencies { .dependencies }

lodash { .dependency }

Provides sandboxing, extensibility hooks, and template configuration.

Install with Tessl CLI

npx tessl i tessl/npm-lodash-kebabcase

tile.json