UNPKG

@redpanda-data/docs-extensions-and-macros

Version:

Antora extensions and macros developed for Redpanda documentation.

8 lines (7 loc) 239 B
module.exports = function anchorName(name) { const anchor = String(name).replace(/[^a-zA-Z0-9]/g, '').toLowerCase(); if (!anchor) { throw new Error(`Invalid property name for anchor generation: "${name}"`); } return anchor; };