Native Assertion module?

Thaddee Tyl thaddee.tyl at
Mon Feb 13 11:13:46 PST 2012

(I am sorry that I mistakenly sent this only to Rick Waldron. I
intended it for es-discuss.)

On Mon, Feb 13, 2012 at 5:04 PM, Rick Waldron <waldron.rick at> wrote:
> I was wondering if a native Assertion module had ever been discussed or
> proposed - I searched[1] and found nothing. If anyone can point me to
> existing discussion or proposals that I might have missed, I was be greatly
> appreciative. The simplest explanation of my thinking is something closer to
> a "standard lib" module, similar to Globalization or "Iter".

If you do a native Assertion module, maybe it should be similar to node's.


This being said, the node authors only added the "assert" api because
they use it in node. I find no compelling reason to have that in JS.

Citation from Isaac Shlueter:
> There are two reasons to put something in core:
> 1. It is an established core internet technology with a clearly correct approach that is difficult to do properly. In those cases, we provide a low-level binding. Tcp, http, zlib, and udp are good examples of this. Http is probably the highest-level API we have, but http is batshit insane and difficult, and the most important internet protocol.
> 2. It is something that is used internally in node-core. We use assert in the node-core tests. We're not going to bundle a more robust test framework than we need. We use util.inherits in node core. We're not going to add a class system with more features than we need.

More information about the es-discuss mailing list