# camelize
将中划线(-)字符串转换为驼峰字符串
import { camelize } from '@hui-pro/utils';
camelize('camel-case', upperCase); // return camelCase
提示
由于 IE 中,'-ms-' 对应小写的 'ms',而不是驼峰式的 'Ms',转换 css 属性名时可使用内部函数 camelizeStyle
import { camelizeStyle } from '@hui-pro/utils';
camelizeStyle('-ms-animation'); // return msAnimation
# API
参数 | 说明 | 类型 | 默认值 | 可选值 |
---|---|---|---|---|
sting | 需要转换的字符串 | String | - | - |
upperCase | true 为大驼峰,false 为小驼峰 | Boolean | false | - |
← bytes2text hyphenate →