Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

gnipbao
Copy link

@gnipbao gnipbao commented Dec 16, 2017

add camelize , decamelize flatten function to js.md (ps:test pr):dog:

function decamelize(str, separator){
separator = typeof separator === 'undefined' ? '_' : separator;
return str
.replace(/([a-z\d])([A-Z])/g, '$1' + separator + '$2')
Copy link

@S1ngS1ng S1ngS1ng Dec 18, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

谢谢你的 pr。请把这里的缩进调整下吧。像上面一样,四个就好。文件其他位置也有缩进不对的。我有空了再调吧

* @param separator Separator for the new decamelized string.
*/
function decamelize(str, separator){
separator = typeof separator === 'undefined' ? '_' : separator;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里也是

```js
function flatten(arr){
var i,ret=[], len = arr.length;
for(i=0;i<len;i++){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

还有这里。谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants