1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-04 15:02:09 +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,26 +1,26 @@
'use strict';
var redis = require("redis"),
var redis = require('redis'),
client = redis.createClient();
client.on("error", function (err) {
console.log("error event - " + client.host + ":" + client.port + " - " + err);
client.on('error', function (err) {
console.log('error event - ' + client.host + ':' + client.port + ' - ' + err);
});
client.set("string key", "string val", redis.print);
client.hset("hash key", "hashtest 1", "some value", redis.print);
client.hset(["hash key", "hashtest 2", "some other value"], redis.print);
client.hkeys("hash key", function (err, replies) {
client.set('string key', 'string val', redis.print);
client.hset('hash key', 'hashtest 1', 'some value', redis.print);
client.hset(['hash key', 'hashtest 2', 'some other value'], redis.print);
client.hkeys('hash key', function (err, replies) {
if (err) {
return console.error("error response - " + err);
return console.error('error response - ' + err);
}
console.log(replies.length + " replies:");
console.log(replies.length + ' replies:');
replies.forEach(function (reply, i) {
console.log(" " + i + ": " + reply);
console.log(' ' + i + ': ' + reply);
});
});
client.quit(function (err, res) {
console.log("Exiting from quit command.");
console.log('Exiting from quit command.');
});