Browse Source

Add node.assert for internal debugging.

v0.7.4-release
Ryan 15 years ago
parent
commit
7e7deed510
  1. 4
      src/util.js

4
src/util.js

@ -19,6 +19,10 @@ node.inherits = function (ctor, superCtor) {
ctor.prototype.constructor = ctor;
};
node.assert = function (x) {
if (!(x)) throw (msg || "assertion error");
};
// This is useful for dealing with raw encodings.
node.encodeUtf8 = function (array) {
var string = "";

Loading…
Cancel
Save