@pengzhanbo/utils - v3.4.1
    Preparing search index...

    Function constantCase

    • Converts a string to constant case

      将字符串转换为常量命名法

      Parameters

      • str: string

        The string to convert. 要转换的字符串

      Returns string

      The string in constant case. 常量命名法格式的字符串

      constantCase('foo bar') // => FOO_BAR
      constantCase('foo-bar') // => FOO_BAR