Function makeAnchor

  • Helper function to transform a string to make it more usable in a URL or filename. Converts to lowercase and replaces non-word characters with hyphen ('-').

    Parameters

    • s: string

    Returns string

    makeAnchor('Rosh Chodesh Adar II') // 'rosh-chodesh-adar-ii'