Skip to content

Commit f22c248

Browse files
committed
more lint
1 parent ac58d3a commit f22c248

4 files changed

Lines changed: 91 additions & 76 deletions

File tree

lib/console.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ var writeError = process.binding('stdio').writeError;
22

33
// console object
44
var formatRegExp = /%[sdj]/g;
5-
function format (f) {
5+
function format(f) {
66
if (typeof f !== 'string') {
77
var objects = [], util = require('util');
88
for (var i = 0; i < arguments.length; i++) {
@@ -14,7 +14,7 @@ function format (f) {
1414

1515
var i = 1;
1616
var args = arguments;
17-
var str = String(f).replace(formatRegExp, function (x) {
17+
var str = String(f).replace(formatRegExp, function(x) {
1818
switch (x) {
1919
case '%s': return args[i++];
2020
case '%d': return +args[i++];
@@ -30,41 +30,41 @@ function format (f) {
3030
}
3131

3232

33-
exports.log = function () {
33+
exports.log = function() {
3434
process.stdout.write(format.apply(this, arguments) + '\n');
3535
};
3636

3737

3838
exports.info = exports.log;
3939

4040

41-
exports.warn = function () {
41+
exports.warn = function() {
4242
writeError(format.apply(this, arguments) + '\n');
4343
};
4444

4545

4646
exports.error = exports.warn;
4747

4848

49-
exports.dir = function(object){
49+
exports.dir = function(object) {
5050
var util = require('util');
5151
process.stdout.write(util.inspect(object) + '\n');
5252
};
5353

5454

5555
var times = {};
56-
exports.time = function(label){
56+
exports.time = function(label) {
5757
times[label] = Date.now();
5858
};
5959

6060

61-
exports.timeEnd = function(label){
61+
exports.timeEnd = function(label) {
6262
var duration = Date.now() - times[label];
6363
exports.log('%s: %dms', label, duration);
6464
};
6565

6666

67-
exports.trace = function(label){
67+
exports.trace = function(label) {
6868
// TODO probably can to do this better with V8's debug object once that is
6969
// exposed.
7070
var err = new Error;
@@ -75,8 +75,8 @@ exports.trace = function(label){
7575
};
7676

7777

78-
exports.assert = function(expression){
79-
if(!expression){
78+
exports.assert = function(expression) {
79+
if (!expression) {
8080
var arr = Array.prototype.slice.call(arguments, 1);
8181
process.assert(false, format.apply(this, arr));
8282
}

lib/constants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
module.exports = process.binding("constants");
1+
module.exports = process.binding('constants');

lib/crypto.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ try {
1616
}
1717

1818

19-
function Credentials (method) {
19+
function Credentials(method) {
2020
if (!(this instanceof Credentials)) {
2121
return new Credentials(method);
2222
}
@@ -38,7 +38,7 @@ function Credentials (method) {
3838
exports.Credentials = Credentials;
3939

4040

41-
exports.createCredentials = function (options) {
41+
exports.createCredentials = function(options) {
4242
if (!options) options = {};
4343
var c = new Credentials(options.method);
4444

@@ -63,46 +63,46 @@ exports.createCredentials = function (options) {
6363

6464

6565
exports.Hash = Hash;
66-
exports.createHash = function (hash) {
66+
exports.createHash = function(hash) {
6767
return new Hash(hash);
6868
};
6969

7070

7171
exports.Hmac = Hmac;
72-
exports.createHmac = function (hmac, key) {
72+
exports.createHmac = function(hmac, key) {
7373
return (new Hmac).init(hmac, key);
7474
};
7575

7676

7777
exports.Cipher = Cipher;
78-
exports.createCipher = function (cipher, key) {
78+
exports.createCipher = function(cipher, key) {
7979
return (new Cipher).init(cipher, key);
8080
};
8181

8282

83-
exports.createCipheriv = function (cipher, key, iv) {
83+
exports.createCipheriv = function(cipher, key, iv) {
8484
return (new Cipher).initiv(cipher, key, iv);
8585
};
8686

8787

8888
exports.Decipher = Decipher;
89-
exports.createDecipher = function (cipher, key) {
89+
exports.createDecipher = function(cipher, key) {
9090
return (new Decipher).init(cipher, key);
9191
};
9292

9393

94-
exports.createDecipheriv = function (cipher, key, iv) {
94+
exports.createDecipheriv = function(cipher, key, iv) {
9595
return (new Decipher).initiv(cipher, key, iv);
9696
};
9797

9898

9999
exports.Sign = Sign;
100-
exports.createSign = function (algorithm) {
100+
exports.createSign = function(algorithm) {
101101
return (new Sign).init(algorithm);
102102
};
103103

104104
exports.Verify = Verify;
105-
exports.createVerify = function (algorithm) {
105+
exports.createVerify = function(algorithm) {
106106
return (new Verify).init(algorithm);
107107
};
108108

0 commit comments

Comments
 (0)