idCompliant

Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.string

This function take a string and return a version of it that you can safely use in html id for example. It replace spaces with ’-’ as well as all the special characters with their simple version like “à” will be replaces by “a”

Params

  1. string*-String

    The string to process

Return

  1. -String

    The processed string

Example

import { idCompliant } from '@blackbyte/sugar/string';
idCompliant('Hello world'); // => hello-world

Todo

  • testsnormal