MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / slugifyVariable

Function slugifyVariable

packages/core/sdk/src/migration-spec.ts:438–442  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

436/** Slugify a header/query name into a stable variable identifier:
437 * `DD-API-KEY` → `dd_api_key`. */
438const slugifyVariable = (name: string): string =>
439 name
440 .toLowerCase()
441 .replace(/[^a-z0-9]+/g, "_")
442 .replace(/^_+|_+$/g, "");
443
444interface Placement {
445 readonly carrier: "header" | "query";

Callers 2

variableForFunction · 0.70
hostSlugFunction · 0.70

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected