Skip to content

Commit 1f9e536

Browse files
author
Ruben Bridgewater
committed
Add use strict statements
This is going to improve the performance minimal and improves the safety of the code
1 parent e34debd commit 1f9e536

37 files changed

+76
-2
lines changed

benches/buffer_bench.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 source = new Buffer(100),
24
dest = new Buffer(100), i, j, k, tmp, count = 1000000, bytes = 100;
35

benches/hiredis_parser.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 Parser = require('../lib/parser/hiredis').Parser;
24
var assert = require('assert');
35

benches/re_sub_test.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 client = require('../index').createClient()
24
, client2 = require('../index').createClient()
35
, assert = require('assert');

benches/reconnect_test.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 redis = require("../index").createClient(null, null, {
24
// max_attempts: 4
35
});

benches/stress/codec.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 json = {
24
encode: JSON.stringify,
35
decode: JSON.parse

benches/stress/speed/speed.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 msgpack = require('node-msgpack');
24
var bison = require('bison');
35
var codec = {

benches/sub_quit_test.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 client = require("redis").createClient(),
24
client2 = require("redis").createClient();
35

connection_breaker.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 net = require('net');
24

35
var proxyPort = 6379;

diff_multi_bench_output.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env node
22

3+
'use strict';
4+
35
var colors = require('colors'),
46
fs = require('fs'),
57
_ = require('underscore'),

examples/auth.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 redis = require("redis"),
24
client = redis.createClient();
35

0 commit comments

Comments
 (0)