bootstrap-vue
Version:
Quickly integrate Bootstrap 4 components with Vue.js
13 lines (11 loc) • 382 B
JavaScript
import upperFirst from "./upperFirst";
/**
* Suffix can be a falsey value so nothing is appended to string.
* (helps when looping over props & some shouldn't change)
* Use data last parameters to allow for currying.
* @param {string} suffix
* @param {string} str
*/
export default function suffixPropName(suffix, str) {
return str + (suffix ? upperFirst(suffix) : "");
}