0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00

Add node.assert for internal debugging.

This commit is contained in:
Ryan 2009-08-26 18:01:54 +02:00
parent 18d0511777
commit 7e7deed510

View File

@ -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 = "";