Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1 from iriscouch/node_0.6

Minor Node 0.6 upgrades
  • Loading branch information...
commit 76f2a707c68628077d440e796b1b937b778a4048 2 parents 2ae83e2 + 0670c2a
@Floby authored
Showing with 4 additions and 5 deletions.
  1. +3 −4 lib/Tokenizer.js
  2. +1 −1  package.json
View
7 lib/Tokenizer.js
@@ -1,5 +1,5 @@
var EventEmitter = require('events').EventEmitter;
-var sys = require('sys');
+var util = require('util');
var assert = require('assert');
function noop(){}
@@ -13,7 +13,7 @@ function Tokenizer (check_token_cb) {
// these will be parsed but not emitted
this._checkToken = check_token_cb || noop;
}
-sys.inherits(Tokenizer, EventEmitter);
+util.inherits(Tokenizer, EventEmitter);
Tokenizer.prototype.write = function write(data, nobuffer) {
assert.ok(typeof data == 'string');
@@ -89,8 +89,7 @@ Tokenizer.prototype.addRule = function addRule(regex, type) {
if(!type) {
return this.addRule(regex[0], regex[1]);
}
- assert.equal(typeof regex, 'function');
- //assert.ok(regex instanceof RegExp);
+ assert.ok((regex instanceof RegExp) || (typeof regex === 'function'))
assert.equal(typeof type, 'string');
this._regexes.push({regex:regex,type:type});
};
View
2  package.json
@@ -13,6 +13,6 @@
"lib": "lib"
},
"engines": {
- "node": "*"
+ "node": "~0.4 ~0.5 ~0.6"
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.