KC's Workspace
    Preparing search index...
    type List = {
        default: List;
        comma(str: string): string[];
        space(str: string): string[];
        split(
            string: string,
            separators: readonly string[],
            last: boolean,
        ): string[];
    }
    Index

    Properties

    Methods

    Properties

    default: List

    Methods

    • Safely splits comma-separated values (such as those for transition-* and background properties).

      Once (root, { list }) {
      list.comma('black, linear-gradient(white, black)')
      //=> ['black', 'linear-gradient(white, black)']
      }

      Parameters

      • str: string

        Comma-separated values.

      Returns string[]

      Split values.

    • Safely splits space-separated values (such as those for background, border-radius, and other shorthand properties).

      Once (root, { list }) {
      list.space('1px calc(10% + 1px)') //=> ['1px', 'calc(10% + 1px)']
      }

      Parameters

      • str: string

        Space-separated values.

      Returns string[]

      Split values.

    • Safely splits values.

      Once (root, { list }) {
      list.split('1px calc(10% + 1px)', [' ', '\n', '\t']) //=> ['1px', 'calc(10% + 1px)']
      }

      Parameters

      • string: string

        separated values.

      • separators: readonly string[]

        array of separators.

      • last: boolean

        boolean indicator.

      Returns string[]

      Split values.