Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add camelize , decamelize flatten function to js.md #36

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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