Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
simon_renoult
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
Clean Code and Node.js
(blog.octo.com)
2 points
by
simon_renoult
9y ago
|
0 comments
2.
▲
by
simon_renoult
10y ago
I'm a nodejs developer. I use its package manager `npm` on a daily basis. `nodejs` packaging philosophy enforces you to break every lib into smaller modules in order to have small, consistent, easy to reason about, modules. While being
3.
▲
by
simon_renoult
12y ago
"require('./user/auth')(User);" is a simple call to the "./user/auth" module with User as a parameter. Check https://github.com/NodeBB/NodeBB/blob/master/
4.
▲
by
simon_renoult
13y ago
I didn't know HN was about success.
5.
▲
by
simon_renoult
13y ago
Why using : function doFoo(bar) { bar = (bar !== undefined) ? bar : "default_value"; } Over : function doFoo(bar) { bar = bar || "default_value"; } Coercion avoidance ?
6.
▲
by
simon_renoult
13y ago
Plus - sadly - expensive.