Blame view

天文台pc/tianwentai-ui/node_modules/string-convert/README.md 636 Bytes
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
  string-convert
  ==============
  
  Set of string conversion functions
  
  Installation
  ------------
    npm install string-convert --save
  
  Methods
  -------
  
  ### hyphen2camel
  
  Converts hyphenated string to camelcase string
  
  Example:
  
  ```javascript
  var hyphen2camel = require('string-convert/hyphen2camel');
  hyphen2camel('min-width'); // minWidth
  hyphen2camel('-moz-transition'); // MozTransition
  ```
  
  ### camel2hyphen
  
  Converts camel case string to hyphenated string
  
  Example:
  
  ```javascript
  var camel2hyphen = require('string-convert/camel2hyphen');
  camel2hyphen('minWidth');  // min-width
  camel2hyphen('MozTransition'); //-moz-transition 
  ```