Node-Red configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

list.d.ts 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. declare namespace list {
  2. type List = {
  3. /**
  4. * Safely splits comma-separated values (such as those for `transition-*`
  5. * and `background` properties).
  6. *
  7. * ```js
  8. * 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. default: List
  19. /**
  20. * Safely splits space-separated values (such as those for `background`,
  21. * `border-radius`, and other shorthand properties).
  22. *
  23. * ```js
  24. * Once (root, { list }) {
  25. * list.space('1px calc(10% + 1px)') //=> ['1px', 'calc(10% + 1px)']
  26. * }
  27. * ```
  28. *
  29. * @param str Space-separated values.
  30. * @return Split values.
  31. */
  32. space(str: string): string[]
  33. /**
  34. * Safely splits values.
  35. *
  36. * ```js
  37. * Once (root, { list }) {
  38. * list.split('1px calc(10% + 1px)', [' ', '\n', '\t']) //=> ['1px', 'calc(10% + 1px)']
  39. * }
  40. * ```
  41. *
  42. * @param string separated values.
  43. * @param separators array of separators.
  44. * @param last boolean indicator.
  45. * @return Split values.
  46. */
  47. split(string: string, separators: string[], last: boolean): string[]
  48. }
  49. }
  50. declare const list: list.List
  51. export = list