Files
baserow/web-frontend/modules/automation/utils/aliases.js
Tsering Paljor c95046c2f9 feat: Add Automation recipes for For and While loops (#6338)
* Add recipies for For and While loops

* Add tests

* Add changelog

* Fix the clean-up when rolling back
2026-10-16 08:57:23 +04:00

14 lines
486 B
JavaScript

/**
* Search aliases are kept as one comma-separated locale string per type, so
* every language can add its own terms through Weblate. This turns such a
* string into the list of terms the add-node menu matches against.
* @param {string} value - e.g. "loop, for loop, repeat"
* @returns {string[]} - e.g. ["loop", "for loop", "repeat"]
*/
export function parseAliases(value) {
return String(value || '')
.split(',')
.map((alias) => alias.trim())
.filter(Boolean)
}