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:
parent
18d0511777
commit
7e7deed510
@ -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…
Reference in New Issue
Block a user