UNPKG

@vtexlab/planner-contracts

Version:

Contracts to use in an Eventual-Driven Architecture (EDA)

10 lines (9 loc) 327 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.toKebabCase = toKebabCase; function toKebabCase(name) { const cleanedName = name.replace(/[^a-zA-Z0-9]/g, ''); const words = cleanedName.split(/(?=[A-Z])/); const kebabName = words.join('-').toLowerCase(); return kebabName; }