Re: [nodejs] npm package mutability

2014-02-04 Thread Thom Blake
You can maintain your updated version of the module in its own repository and change your package.json to point to that instead of the npm registry version. On Monday, February 3, 2014 10:18:43 PM UTC-8, Alex Kocharin wrote: > > > 20.12.2013, 03:48, "Mikeal Rogers" >: > > > On Dec 19, 2013, at

Re: [nodejs] I can't understand why this happen, it's a simple code

2012-07-30 Thread Thom Blake
`exports` is simply a variable containing a reference to `module.exports`. `module.exports` is an empty object to start, so you can start assigning stuff to its properties right away. So when you have `var app = exports`, you're using `app` as a reference to the object assigned to `module.expo

[nodejs] Re: Emacs

2012-07-13 Thread Thom Blake
I use js3-mode, with these settings for custom-set-variables: '(js3-mode-dev-mode-p t) '(js3-auto-indent-p t) '(js3-enter-indents-newline t) '(js3-indent-on-enter-key t) dev-mode can slow things down a bit, but it nicely highlights chunks of code when you click on them. Useful for debugging

[nodejs] Re: tool for ending JS style debates

2012-05-04 Thread Thom Blake
On Thursday, May 3, 2012 11:57:14 AM UTC-4, Bradley Meck wrote: > > AST Generation w/ Comments : http://esprima.org/ > > Awesome. Will check that out posthaste. > Line breaks: > - if indent < length > - - indent or no indent on line break (configurable / amount) > - - operator at end of line

[nodejs] Re: tool for ending JS style debates

2012-05-03 Thread Thom Blake
It's a great idea, but making JS style computable isn't exactly easy. There are a lot of tradeoffs to navigate, especially when dealing with concerns like maximum line length limit. Tools like minifiers can do some wonderful things by parsing the JS and creating an AST, but in doing so they d

[nodejs] emacs js3-mode update

2012-05-02 Thread Thom Blake
A much clamored-for feature has been implemented for js3-mode. Now with the default settings (js3-consistent-level-indent-inner- bracket set to nil) functions tend to get indented the way you want them to in common cases. For example, function bodies following lines starting with `;(function` are

[nodejs] Re: JSLint or not?

2012-02-23 Thread Thom Blake
On Feb 23, 3:57 pm, Dean Landolt wrote: > > Besides, emacs would kindly have underlined that bit in red for me. > > (and turned yellow any globals) > > That's called a "linter" ;) Funny, I would have just called it a properly-functioning code editor. Besides, the first one is a syntax error -

[nodejs] Re: JSLint or not?

2012-02-23 Thread Thom Blake
Much agreed with Jonny. That code has ugly separators at the end of lines and jumped out immediately. Besides, emacs would kindly have underlined that bit in red for me. (and turned yellow any globals) On Feb 23, 2:48 pm, Jonathan Buchanan wrote: > On 23 February 2012 14:29, Dean Landolt wrote

[nodejs] Re: Alpha release of Coalitions.US.Org

2012-02-15 Thread Thom Blake
I must say, I love the "sign up with Github" option - not sure I've seen that one before. And good signup process in general. While sending a confirmation e- mail instantly seems like a no-brainer these days, there are still plenty of folks who can't manage it. On Feb 14, 7:49 pm, Jim Lloyd wro

[nodejs] Re: how to write for-each loop in JavaScript properly

2012-02-13 Thread Thom Blake
Well, in < ES4 that is. On Feb 13, 9:43 am, Thom Blake wrote: > > Or if you do make them DontEnum. > > DontEnum is not a property that can be set by the user. > > On Feb 12, 3:09 pm, Marcel Laverdet wrote: > > > > > > > > > This is one of those

[nodejs] Re: how to write for-each loop in JavaScript properly

2012-02-13 Thread Thom Blake
> Or if you do make them DontEnum. DontEnum is not a property that can be set by the user. On Feb 12, 3:09 pm, Marcel Laverdet wrote: > This is one of those old Crockfordisms that I definitely don't agree with. > How about instead you just don't add garbage to Object.prototype? Or if you > do ma