use strict in all .js files

closes #508
This commit is contained in:
Tejas Manohar 2015-10-11 17:59:51 -05:00 committed by Jonathan Ong
parent f875eb0c30
commit 0b1b49cb8a
65 changed files with 138 additions and 8 deletions

View file

@ -1,4 +1,6 @@
'use strict';
var http = require('http'); var http = require('http');
var koa = require('../..'); var koa = require('../..');
var app = koa(); var app = koa();

View file

@ -1,4 +1,6 @@
'use strict';
// support async await by babel // support async await by babel
require('babel/register')({ require('babel/register')({
optional: ['asyncToGenerator'] optional: ['asyncToGenerator']

View file

@ -1,4 +1,6 @@
'use strict';
var http = require('http'); var http = require('http');
var koa = require('..'); var koa = require('..');
var app = koa(); var app = koa();

View file

@ -1,4 +1,6 @@
'use strict';
/** /**
* Module dependencies. * Module dependencies.
*/ */

View file

@ -1,4 +1,6 @@
'use strict';
/** /**
* Module dependencies. * Module dependencies.
*/ */

View file

@ -1,4 +1,6 @@
'use strict';
/** /**
* Module dependencies. * Module dependencies.
*/ */

View file

@ -1,4 +1,6 @@
'use strict';
/** /**
* Module dependencies. * Module dependencies.
*/ */

View file

@ -1,4 +1,6 @@
'use strict';
var stderr = require('test-console').stderr; var stderr = require('test-console').stderr;
var request = require('supertest'); var request = require('supertest');
var statuses = require('statuses'); var statuses = require('statuses');

View file

@ -1,4 +1,6 @@
'use strict';
var Stream = require('stream'); var Stream = require('stream');
var koa = require('..'); var koa = require('..');

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context'); var context = require('../context');
var assert = require('assert'); var assert = require('assert');

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('supertest'); var request = require('supertest');
var koa = require('../..'); var koa = require('../..');

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context'); var context = require('../context');
describe('ctx.inspect()', function(){ describe('ctx.inspect()', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('supertest'); var request = require('supertest');
var koa = require('../..'); var koa = require('../..');

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('supertest'); var request = require('supertest');
var assert = require('assert'); var assert = require('assert');
var koa = require('../..'); var koa = require('../..');

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context'); var context = require('../context');
var assert = require('assert'); var assert = require('assert');

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context'); var context = require('../context');
describe('ctx.toJSON()', function(){ describe('ctx.toJSON()', function(){

View file

@ -1,4 +1,6 @@
'use strict';
/** /**
* Separate file primarily because we use `require('babel/register')`. * Separate file primarily because we use `require('babel/register')`.
*/ */

View file

@ -1,4 +1,6 @@
'use strict';
require('babel/register')({ require('babel/register')({
optional: ['asyncToGenerator'] optional: ['asyncToGenerator']
}); });

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context'); var context = require('../context');
describe('ctx.accepts(types)', function(){ describe('ctx.accepts(types)', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context'); var context = require('../context');
describe('ctx.acceptsCharsets()', function(){ describe('ctx.acceptsCharsets()', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context'); var context = require('../context');
describe('ctx.acceptsEncodings()', function(){ describe('ctx.acceptsEncodings()', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context'); var context = require('../context');
describe('ctx.acceptsLanguages(langs)', function(){ describe('ctx.acceptsLanguages(langs)', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('../context').request; var request = require('../context').request;
var assert = require('assert'); var assert = require('assert');

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context'); var context = require('../context');
describe('ctx.fresh', function(){ describe('ctx.fresh', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context'); var context = require('../context');
describe('ctx.get(name)', function(){ describe('ctx.get(name)', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('../context').request; var request = require('../context').request;
describe('req.header', function(){ describe('req.header', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('../context').request; var request = require('../context').request;
describe('req.headers', function(){ describe('req.headers', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('../context').request; var request = require('../context').request;
var assert = require('assert'); var assert = require('assert');

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('../context').request; var request = require('../context').request;
var assert = require('assert'); var assert = require('assert');

View file

@ -1,4 +1,6 @@
'use strict';
var Stream = require('stream'); var Stream = require('stream');
var http = require('http'); var http = require('http');
var koa = require('../../'); var koa = require('../../');

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('../context').request; var request = require('../context').request;
describe('ctx.idempotent', function(){ describe('ctx.idempotent', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('../context').request; var request = require('../context').request;
var assert = require('assert'); var assert = require('assert');

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('../context').request; var request = require('../context').request;
describe('req.ip', function(){ describe('req.ip', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('../context').request; var request = require('../context').request;
describe('req.ips', function(){ describe('req.ips', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context'); var context = require('../context');
var should = require('should'); var should = require('should');
var assert = require('assert'); var assert = require('assert');

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('../context').request; var request = require('../context').request;
var assert = require('assert'); var assert = require('assert');

View file

@ -1,4 +1,6 @@
'use strict';
var Stream = require('stream'); var Stream = require('stream');
var http = require('http'); var http = require('http');
var koa = require('../../'); var koa = require('../../');

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context'); var context = require('../context');
describe('ctx.path', function(){ describe('ctx.path', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('../context').request; var request = require('../context').request;
describe('req.protocol', function(){ describe('req.protocol', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context'); var context = require('../context');
describe('ctx.query', function(){ describe('ctx.query', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context'); var context = require('../context');
describe('ctx.querystring', function(){ describe('ctx.querystring', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context'); var context = require('../context');
describe('ctx.search=', function(){ describe('ctx.search=', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('../context').request; var request = require('../context').request;
describe('req.secure', function(){ describe('req.secure', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context'); var context = require('../context');
describe('req.stale', function(){ describe('req.stale', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('../context').request; var request = require('../context').request;
describe('req.subdomains', function(){ describe('req.subdomains', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var request = require('../context').request; var request = require('../context').request;
var assert = require('assert'); var assert = require('assert');

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context'); var context = require('../context');
describe('ctx.append(name, val)', function(){ describe('ctx.append(name, val)', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context'); var context = require('../context');
var request = require('supertest'); var request = require('supertest');
var koa = require('../..'); var koa = require('../..');

View file

@ -1,4 +1,6 @@
'use strict';
var response = require('../context').response; var response = require('../context').response;
var assert = require('assert'); var assert = require('assert');
var fs = require('fs'); var fs = require('fs');

View file

@ -1,4 +1,6 @@
'use strict';
var response = require('../context').response; var response = require('../context').response;
describe('res.etag=', function(){ describe('res.etag=', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var response = require('../context').response; var response = require('../context').response;
describe('res.header', function(){ describe('res.header', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var response = require('../context').response; var response = require('../context').response;
describe('res.header', function(){ describe('res.header', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var response = require('../context').response; var response = require('../context').response;
var assert = require('assert'); var assert = require('assert');

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context'); var context = require('../context');
var should = require('should'); var should = require('should');
var assert = require('assert'); var assert = require('assert');

View file

@ -1,4 +1,6 @@
'use strict';
var response = require('../context').response; var response = require('../context').response;
describe('res.lastModified', function(){ describe('res.lastModified', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var response = require('../context').response; var response = require('../context').response;
var should = require('should'); var should = require('should');
var assert = require('assert'); var assert = require('assert');

View file

@ -1,4 +1,6 @@
'use strict';
var response = require('../context').response; var response = require('../context').response;
var Stream = require('stream'); var Stream = require('stream');

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context'); var context = require('../context');
describe('ctx.redirect(url)', function(){ describe('ctx.redirect(url)', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context'); var context = require('../context');
describe('ctx.remove(name)', function(){ describe('ctx.remove(name)', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context'); var context = require('../context');
describe('ctx.set(name, val)', function(){ describe('ctx.set(name, val)', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var response = require('../context').response; var response = require('../context').response;
var Stream = require('stream'); var Stream = require('stream');

View file

@ -1,4 +1,6 @@
'use strict';
var response = require('../context').response; var response = require('../context').response;
var request = require('supertest'); var request = require('supertest');
var statuses = require('statuses'); var statuses = require('statuses');

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context'); var context = require('../context');
var assert = require('assert'); var assert = require('assert');

View file

@ -1,4 +1,6 @@
'use strict';
var context = require('../context'); var context = require('../context');
describe('ctx.vary(field)', function(){ describe('ctx.vary(field)', function(){

View file

@ -1,4 +1,6 @@
'use strict';
var response = require('../context').response; var response = require('../context').response;
describe('res.writable', function(){ describe('res.writable', function(){