Hey, I prefer to inline the comments by one level and I think that this helps with a better visual separation between comments and code.
// 6.B.1
function Device( opts ) {
this.value = null;
// open an async stream,
// this will be called continuously
stream.read( opts.path, function( data ) {
// Update this instance's current value
// with the most recent value from the
// data stream
this.value = data;
}.bind(this) );
// Throttle the frequency of events emitted from
// this Device instance
setInterval(function() {
// Emit a throttled event
this.emit("event");
}.bind(this), opts.freq || 100 );
}
// Just pretend we've inherited EventEmitter ;)
Hey, I prefer to inline the comments by one level and I think that this helps with a better visual separation between comments and code.