Skip to content

Commit

Permalink
Fix new-parens
Browse files Browse the repository at this point in the history
  • Loading branch information
bananaappletw committed Oct 20, 2016
1 parent a0336c3 commit e0b8ca1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion blog/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function *show(id) {
function *create() {
var post = yield parse(this);
var id = posts.push(post) - 1;
post.created_at = new Date;
post.created_at = new Date();
post.id = id;
this.redirect('/');
}
Expand Down
8 changes: 4 additions & 4 deletions compose/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ var app = module.exports = koa();
// x-response-time

function *responseTime(next){
var start = new Date;
var start = new Date();
yield next;
var ms = new Date - start;
var ms = new Date() - start;
this.set('X-Response-Time', ms + 'ms');
}

// logger

function* logger(next){
var start = new Date;
var start = new Date();
yield next;
var ms = new Date - start;
var ms = new Date() - start;
if ('test' != process.env.NODE_ENV) {
console.log('%s %s - %s', this.method, this.url, ms);
}
Expand Down
4 changes: 2 additions & 2 deletions vhost/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ function composer(app) {
// look ma, global response logging for all our apps!

app.use(function *(next) {
var start = new Date;
var start = new Date();
yield next;
var ms = new Date - start;
var ms = new Date() - start;
if ('test' != process.env.NODE_ENV) {
console.log('%s %s %s - %sms', this.host, this.method, this.url, ms);
}
Expand Down
4 changes: 2 additions & 2 deletions vhost/apps/array.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// bundles of middleware to the same effect.

function *responseTime(next){
var start = new Date;
var start = new Date();
yield next;
var ms = new Date - start;
var ms = new Date() - start;
this.set('X-Response-Time', ms + 'ms');
}

Expand Down

0 comments on commit e0b8ca1

Please sign in to comment.