AK-21/Graphite-Industrial-Intelligence
0
1declare namespace list {2 type List = {3 /**4 * Safely splits comma-separated values (such as those for `transition-*`5 * and `background` properties).6 *7 * ```js8 * Once (root, { list }) {9 * list.comma('black, linear-gradient(white, black)')10 * //=> ['black', 'linear-gradient(white, black)']11 * }12 * ```13 *14 * @param str Comma-separated values.15 * @return Split values.16 */17 comma(str: string): string[]18 19 default: List20 21 /**22 * Safely splits space-separated values (such as those for `background`,23 * `border-radius`, and other shorthand properties).24 *25 * ```js26 * Once (root, { list }) {27 * list.space('1px calc(10% + 1px)') //=> ['1px', 'calc(10% + 1px)']28 * }29 * ```30 *31 * @param str Space-separated values.32 * @return Split values.33 */34 space(str: string): string[]35 36 /**37 * Safely splits values.38 *39 * ```js40 * Once (root, { list }) {41 * list.split('1px calc(10% + 1px)', [' ', '\n', '\t']) //=> ['1px', 'calc(10% + 1px)']42 * }43 * ```44 *45 * @param string separated values.46 * @param separators array of separators.47 * @param last boolean indicator.48 * @return Split values.49 */50 split(51 string: string,52 separators: readonly string[],53 last: boolean54 ): string[]55 }56}57 58declare let list: list.List59 60export = list61 