Skip to content

Commit 21130c7

Browse files
committed
lib: turn on strict mode
Turn on strict mode for the files in the lib/ directory. It helps catch bugs and can have a positive effect on performance. PR-URL: node-forward/node#64 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Fedor Indutny <fedor@indutny.com>
1 parent 963f5e8 commit 21130c7

52 files changed

Lines changed: 110 additions & 9 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

lib/_debug_agent.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var assert = require('assert');
24
var net = require('net');
35
var util = require('util');

lib/_debugger.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22+
'use strict';
23+
2224
var util = require('util'),
2325
path = require('path'),
2426
net = require('net'),

lib/_http_agent.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22+
'use strict';
23+
2224
var net = require('net');
2325
var util = require('util');
2426
var EventEmitter = require('events').EventEmitter;

lib/_http_client.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22+
'use strict';
23+
2224
var util = require('util');
2325
var net = require('net');
2426
var url = require('url');

lib/_http_common.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22+
'use strict';
23+
2224
var FreeList = require('freelist').FreeList;
2325
var HTTPParser = process.binding('http_parser').HTTPParser;
2426

lib/_http_incoming.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22+
'use strict';
23+
2224
var util = require('util');
2325
var Stream = require('stream');
2426

lib/_http_outgoing.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22+
'use strict';
23+
2224
var assert = require('assert').ok;
2325
var Stream = require('stream');
2426
var timers = require('timers');

lib/_http_server.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22+
'use strict';
23+
2224
var util = require('util');
2325
var net = require('net');
2426
var EventEmitter = require('events').EventEmitter;

lib/_linklist.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22+
'use strict';
23+
2224
function init(list) {
2325
list._idleNext = list;
2426
list._idlePrev = list;

lib/_stream_duplex.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
// prototypally inherits from Readable, and then parasitically from
2525
// Writable.
2626

27+
'use strict';
28+
2729
module.exports = Duplex;
2830
var util = require('util');
2931
var Readable = require('_stream_readable');

0 commit comments

Comments
 (0)