Skip to content

Commit

Permalink
examples: use strict mode
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Feb 2, 2022
1 parent 8b9757e commit 20047bb
Show file tree
Hide file tree
Showing 43 changed files with 82 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/auth/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

/**
* Module dependencies.
*/
Expand Down
2 changes: 2 additions & 0 deletions examples/content-negotiation/db.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

var users = [];

users.push({ name: 'Tobi' });
Expand Down
2 changes: 2 additions & 0 deletions examples/content-negotiation/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

var express = require('../../');
var app = module.exports = express();
var users = require('./db');
Expand Down
1 change: 1 addition & 0 deletions examples/content-negotiation/users.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use strict'

var users = require('./db');

Expand Down
2 changes: 2 additions & 0 deletions examples/cookie-sessions/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

/**
* Module dependencies.
*/
Expand Down
2 changes: 2 additions & 0 deletions examples/cookies/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

/**
* Module dependencies.
*/
Expand Down
2 changes: 2 additions & 0 deletions examples/downloads/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

/**
* Module dependencies.
*/
Expand Down
2 changes: 2 additions & 0 deletions examples/ejs/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

/**
* Module dependencies.
*/
Expand Down
2 changes: 2 additions & 0 deletions examples/error-pages/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

/**
* Module dependencies.
*/
Expand Down
2 changes: 2 additions & 0 deletions examples/error/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

/**
* Module dependencies.
*/
Expand Down
2 changes: 2 additions & 0 deletions examples/hello-world/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

var express = require('../../');

var app = module.exports = express()
Expand Down
2 changes: 2 additions & 0 deletions examples/markdown/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

/**
* Module dependencies.
*/
Expand Down
2 changes: 2 additions & 0 deletions examples/multi-router/controllers/api_v1.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

var express = require('../../..');

var apiv1 = express.Router();
Expand Down
2 changes: 2 additions & 0 deletions examples/multi-router/controllers/api_v2.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

var express = require('../../..');

var apiv2 = express.Router();
Expand Down
2 changes: 2 additions & 0 deletions examples/multi-router/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

var express = require('../..');

var app = module.exports = express();
Expand Down
2 changes: 2 additions & 0 deletions examples/multipart/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

/**
* Module dependencies.
*/
Expand Down
2 changes: 2 additions & 0 deletions examples/mvc/controllers/main/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

exports.index = function(req, res){
res.redirect('/users');
};
2 changes: 2 additions & 0 deletions examples/mvc/controllers/pet/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

/**
* Module dependencies.
*/
Expand Down
2 changes: 2 additions & 0 deletions examples/mvc/controllers/user-pet/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

/**
* Module dependencies.
*/
Expand Down
2 changes: 2 additions & 0 deletions examples/mvc/controllers/user/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

/**
* Module dependencies.
*/
Expand Down
2 changes: 2 additions & 0 deletions examples/mvc/db.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

// faux database

var pets = exports.pets = [];
Expand Down
2 changes: 2 additions & 0 deletions examples/mvc/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

/**
* Module dependencies.
*/
Expand Down
2 changes: 2 additions & 0 deletions examples/mvc/lib/boot.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

/**
* Module dependencies.
*/
Expand Down
1 change: 1 addition & 0 deletions examples/online/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use strict'

// install redis first:
// https://redis.io/
Expand Down
2 changes: 2 additions & 0 deletions examples/params/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

/**
* Module dependencies.
*/
Expand Down
2 changes: 2 additions & 0 deletions examples/resource/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

/**
* Module dependencies.
*/
Expand Down
2 changes: 2 additions & 0 deletions examples/route-map/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

/**
* Module dependencies.
*/
Expand Down
2 changes: 2 additions & 0 deletions examples/route-middleware/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

/**
* Module dependencies.
*/
Expand Down
2 changes: 2 additions & 0 deletions examples/route-separation/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

/**
* Module dependencies.
*/
Expand Down
2 changes: 2 additions & 0 deletions examples/route-separation/post.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

// Fake posts database

var posts = [
Expand Down
2 changes: 2 additions & 0 deletions examples/route-separation/site.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

exports.index = function(req, res){
res.render('index', { title: 'Route Separation Example' });
};
2 changes: 2 additions & 0 deletions examples/route-separation/user.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

// Fake user database

var users = [
Expand Down
1 change: 1 addition & 0 deletions examples/search/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use strict'

// install redis first:
// https://redis.io/
Expand Down
2 changes: 2 additions & 0 deletions examples/search/public/client.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

var search = document.querySelector('[type=search]');
var code = document.querySelector('pre');

Expand Down
1 change: 1 addition & 0 deletions examples/session/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use strict'

// install redis first:
// https://redis.io/
Expand Down
2 changes: 2 additions & 0 deletions examples/session/redis.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

/**
* Module dependencies.
*/
Expand Down
2 changes: 2 additions & 0 deletions examples/static-files/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

/**
* Module dependencies.
*/
Expand Down
2 changes: 2 additions & 0 deletions examples/vhost/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

/**
* Module dependencies.
*/
Expand Down
2 changes: 2 additions & 0 deletions examples/view-constructor/github-view.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

/**
* Module dependencies.
*/
Expand Down
2 changes: 2 additions & 0 deletions examples/view-constructor/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

/**
* Module dependencies.
*/
Expand Down
2 changes: 2 additions & 0 deletions examples/view-locals/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

/**
* Module dependencies.
*/
Expand Down
2 changes: 2 additions & 0 deletions examples/view-locals/user.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

module.exports = User;

// faux model
Expand Down
2 changes: 2 additions & 0 deletions examples/web-service/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

/**
* Module dependencies.
*/
Expand Down

0 comments on commit 20047bb

Please sign in to comment.