That'd work, you could add coffee as well. I like to use the path module to fetch extensions though:

```js
var path = require("path");

tasks = tasks.filter(function(name) {
    return /((js|coffee)$)/i.test(path.extname(name));
});
```