UNPKG

@puq/names

Version:

The library provides a useful function to create all casing variants of a given string value such as title-case, pascal-case, snake-case and so more.

10 lines (9 loc) 274 B
import { normalizeName } from './normalize-name.js'; /** * Convert the given {@link name} into slag URL friendly string * @param name * @returns */ export function toSlug(name) { return normalizeName(name).split(' ').join('-'); } //# sourceMappingURL=to-slug.js.map