Permalink
Browse files

typo

  • Loading branch information...
1 parent 1facab1 commit 74a6309c49f9fde3c77e2b1fe8084814075b7f04 @tj committed Apr 14, 2011
Showing with 11 additions and 11 deletions.
  1. +2 −2 lib/commands/server.js
  2. +9 −9 lib/{rewritter.js → rewriter.js}
View
4 lib/commands/server.js
@@ -9,7 +9,7 @@
* Module dependencies.
*/
-var Rewritter = require('../rewritter')
+var Rewriter = require('../rewriter')
, utils = require('../utils')
, nedis = require('../nedis');
@@ -71,6 +71,6 @@ exports.info = function(client){
*/
exports.bgrewriteaof = function(client){
- new Rewritter(this).rewrite();
+ new Rewriter(this).rewrite();
client.write('Background append only file rewriting started');
};
View
18 lib/rewritter.js → lib/rewriter.js
@@ -1,6 +1,6 @@
/*!
- * Nedis - Rewritter
+ * Nedis - Rewriter
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/
@@ -15,12 +15,12 @@ var exec = require('child_process').exec
, fs = require('fs');
/**
- * Initialize a new AOF Rewritter with the given `db`.
+ * Initialize a new AOF Rewriter with the given `db`.
*
* @param {Database}
*/
-var Rewritter = module.exports = function Rewritter(db) {
+var Rewriter = module.exports = function Rewriter(db) {
// TODO: worker
// TODO: buffered stream fsync
var self = this;
@@ -33,7 +33,7 @@ var Rewritter = module.exports = function Rewritter(db) {
* Initiate rewritting.
*/
-Rewritter.prototype.rewrite = function(){
+Rewriter.prototype.rewrite = function(){
var keys
, len
, db = this.db
@@ -63,7 +63,7 @@ Rewritter.prototype.rewrite = function(){
* will our tempfile, then callback `fn(err)`.
*/
-Rewritter.prototype.end = function(fn){
+Rewriter.prototype.end = function(fn){
// TODO: less lame
var from = this.path
, to = this.db.filename;
@@ -75,7 +75,7 @@ Rewritter.prototype.end = function(fn){
* Write select.
*/
-Rewritter.prototype.select = function(i){
+Rewriter.prototype.select = function(i){
this.stream.write('*2\r\n$6\r\nSELECT\r\n');
this.stream.write('$' + i.toString().length + '\r\n');
this.stream.write(i + '\r\n');
@@ -85,7 +85,7 @@ Rewritter.prototype.select = function(i){
* Write key / val.
*/
-Rewritter.prototype.write = function(key, val){
+Rewriter.prototype.write = function(key, val){
var type = val.type || 'string';
return this[type](key, val);
};
@@ -94,7 +94,7 @@ Rewritter.prototype.write = function(key, val){
* Write hash.
*/
-Rewritter.prototype.hash = function(key, val) {
+Rewriter.prototype.hash = function(key, val) {
// TODO: HMSET
for (var field in val) {
if ('type' == field) continue;
@@ -117,7 +117,7 @@ Rewritter.prototype.hash = function(key, val) {
* Write string to `stream`.
*/
-Rewritter.prototype.string = function(key, val) {
+Rewriter.prototype.string = function(key, val) {
this.stream.write('*3\r\n');
this.stream.write('$3\r\n');
this.stream.write('SET\r\n');

0 comments on commit 74a6309

Please sign in to comment.