Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

Type aliases

List: { default: List; comma: any; space: any; split: any }

Type declaration

  • default: List
  • comma:function
    • comma(str: string): string[]
    • 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.

  • space:function
    • space(str: string): string[]
    • 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.

  • split:function
    • split(string: string, separators: string[], last: boolean): string[]
    • Safely splits values.

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

      Parameters

      • string: string

        separated values.

      • separators: string[]

        array of separators.

      • last: boolean

        boolean indicator.

      Returns string[]

      Split values.