bootstrap-vue
Version:
BootstrapVue, with more than 85 custom components, over 45 plugins, several custom directives, and over 300 icons, provides one of the most comprehensive implementations of Bootstrap v4 components and grid system for Vue.js. With extensive and automated W
13 lines (10 loc) • 384 B
JavaScript
import { upperFirst } from './string'
/**
* 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
*/
const suffixPropName = (suffix, str) => str + (suffix ? upperFirst(suffix) : '')
export default suffixPropName