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

Update index.js #1

Merged
merged 1 commit into from
Jun 9, 2014
Merged

Update index.js #1

merged 1 commit into from
Jun 9, 2014

Conversation

Jayin
Copy link

@Jayin Jayin commented Jun 9, 2014

keep this style ?

keep this style ?
@fritx
Copy link
Collaborator

fritx commented Jun 9, 2014

Haha, @Jayin thanks for your PR.
I think my style is better, as it's clean (which is also appreciated in java)
And what do you think about your style?
But I'm happy to merge it ;)

fritx added a commit that referenced this pull request Jun 9, 2014
@fritx fritx merged commit 73c7e83 into we-protect:master Jun 9, 2014
@Jayin Jayin deleted the patch-1 branch June 9, 2014 08:33
@Jayin
Copy link
Author

Jayin commented Jun 9, 2014

Coding with node style when writing node. lol

@fritx
Copy link
Collaborator

fritx commented Jun 9, 2014

@Jayin Really? Why do you say it is node style?

@Jayin
Copy link
Author

Jayin commented Jun 9, 2014

I found it mostly used in this style.

module.exports  = function (){
 //...
}

see:@sindresorhus https://github.com/sindresorhus/os-name/blob/master/index.js
@visionmedia: https://github.com/visionmedia/co-body/blob/master/lib/any.js

but @substack is familiar to your style
https://github.com/substack/readable-wrap/blob/master/index.js

@fritx
Copy link
Collaborator

fritx commented Jun 9, 2014

Yes, good reference collecting.
I used to favor yours, but later I became to love cleanness for parts of source code -
Try not to combine things together but break them apart

@tj
Copy link

tj commented Jun 9, 2014

either is fine, I use both depending on the case, if I need to name the function then I'll just module.exports = fn usually, and I make sure that is at the top of the file so it's clear what is being exported

@fritx
Copy link
Collaborator

fritx commented Jun 10, 2014

@visionmedia cool TJ! Lets code as you say hahah @Jayin

fritx added a commit that referenced this pull request May 12, 2016
@tj likes this repo!
#1 (comment)
@we-protect we-protect locked as resolved and limited conversation to collaborators Jul 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants