https://github.com/kne-union/camel-case
将字符串转化成驼峰
https://github.com/kne-union/camel-case
camelcase string
Last synced: about 1 year ago
JSON representation
将字符串转化成驼峰
- Host: GitHub
- URL: https://github.com/kne-union/camel-case
- Owner: kne-union
- License: mit
- Created: 2020-05-09T09:03:04.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-03-20T03:28:16.000Z (about 2 years ago)
- Last Synced: 2025-03-05T09:48:32.272Z (over 1 year ago)
- Topics: camelcase, string
- Language: JavaScript
- Homepage: https://www.kne-union.top
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# camel-case
### 描述
将字符串转化成驼峰
### 安装
```shell
npm i --save @kne/camel-case
```
### 概述
用于将一个字符串转化为驼峰
```js
import camel from '@kne/camel-case';
camel('user-info'); //UserInfo
camel('user-info', {caseStyle: 'lower'}); //UserInfo
```
### 示例
#### 示例样式
```scss
.ant-card {
border-color: black;
text-align: center;
width: 200px;
}
```
#### 示例代码
- 这里填写示例标题
- 这里填写示例说明
- _CamelCase(@kne/camel-case)
```jsx
const {default:camelCase} = _CamelCase;
const BaseExample = ()=>{
return
输入: user-info,输出:{camelCase('user-info')}
输入: user_info,输出:{camelCase('user_info')}
;
};
render();
```
### API
|属性名|说明|类型|默认值|
| --- | --- | --- | --- |