1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00

Small style changes

This commit is contained in:
Ruben Bridgewater
2015-10-04 21:44:52 +02:00
parent 2fc54ece57
commit 7922d4eb85
28 changed files with 386 additions and 390 deletions

View File

@@ -1,6 +1,6 @@
'use strict';
var hiredis = require("hiredis");
var hiredis = require('hiredis');
function HiredisReplyParser(return_buffers) {
this.name = exports.name;
@@ -39,4 +39,4 @@ HiredisReplyParser.prototype.execute = function (data) {
};
exports.Parser = HiredisReplyParser;
exports.name = "hiredis";
exports.name = 'hiredis';

View File

@@ -1,6 +1,6 @@
'use strict';
var util = require("util");
var util = require('util');
function Packet(type, size) {
this.type = type;
@@ -13,11 +13,11 @@ function ReplyParser(return_buffers) {
this._buffer = new Buffer(0);
this._offset = 0;
this._encoding = "utf-8";
this._encoding = 'utf-8';
}
function IncompleteReadBuffer(message) {
this.name = "IncompleteReadBuffer";
this.name = 'IncompleteReadBuffer';
this.message = message;
}
util.inherits(IncompleteReadBuffer, Error);
@@ -31,7 +31,7 @@ ReplyParser.prototype._parseResult = function (type) {
start = this._offset;
if (end > this._buffer.length) {
throw new IncompleteReadBuffer("Wait for more data.");
throw new IncompleteReadBuffer('Wait for more data.');
}
// include the delimiter
@@ -49,7 +49,7 @@ ReplyParser.prototype._parseResult = function (type) {
start = this._offset;
if (end > this._buffer.length) {
throw new IncompleteReadBuffer("Wait for more data.");
throw new IncompleteReadBuffer('Wait for more data.');
}
// include the delimiter
@@ -73,7 +73,7 @@ ReplyParser.prototype._parseResult = function (type) {
start = this._offset;
if (end > this._buffer.length) {
throw new IncompleteReadBuffer("Wait for more data.");
throw new IncompleteReadBuffer('Wait for more data.');
}
// set the offset to after the delimiter
@@ -93,7 +93,7 @@ ReplyParser.prototype._parseResult = function (type) {
if (packetHeader.size > this._bytesRemaining()) {
this._offset = offset - 1;
throw new IncompleteReadBuffer("Wait for more data.");
throw new IncompleteReadBuffer('Wait for more data.');
}
var reply = [];
@@ -105,7 +105,7 @@ ReplyParser.prototype._parseResult = function (type) {
ntype = this._buffer[this._offset++];
if (this._offset > this._buffer.length) {
throw new IncompleteReadBuffer("Wait for more data.");
throw new IncompleteReadBuffer('Wait for more data.');
}
res = this._parseResult(ntype);
reply.push(res);
@@ -199,7 +199,7 @@ ReplyParser.prototype._packetEndOffset = function () {
/* istanbul ignore if: activate the js parser out of memory test to test this */
if (offset >= this._buffer.length) {
throw new IncompleteReadBuffer("didn't see LF after NL reading multi bulk count (" + offset + " => " + this._buffer.length + ", " + this._offset + ")");
throw new IncompleteReadBuffer('Did not see LF after NL reading multi bulk count (' + offset + ' => ' + this._buffer.length + ', ' + this._offset + ')');
}
}
@@ -212,4 +212,4 @@ ReplyParser.prototype._bytesRemaining = function () {
};
exports.Parser = ReplyParser;
exports.name = "javascript";
exports.name = 'javascript';