Detalhes do pacote

thus

bchociej4depreciado1.0.0

Use Function#bind()

Create a JavaScript scope in which the enclosing function's first argument is referred to as `this'

coffeescript, bind, apply, scope

readme (leia-me)

thus

Create a JavaScript scope in which the enclosing function's first argument is referred to as `this'.

This is primarily a convenience function for writing CoffeeScript:

thus express(), ->
    @set 'view engine', 'jade'
    @listen 8080

Expressed in JS, that would be:

thus(express(), function() {
    this.set('view engine', 'jade');
    this.listen(8080);
});

Which is functionally equivalent to:

var app = express();
app.set('view engine', 'jade');
app.listen(8080);

Might seem stupid, but I like writing code this way.