Node.js 断言完整引用

原文:https://www . geesforgeks . org/node-js-assert-complete-reference/

Node.js 中的断言模块提供了一系列对函数断言有用的工具。assert 模块提供了一组用于验证不变量的断言函数。如果条件为真,它将不会输出其他任何东西,控制台会给出一个断言错误。

NodeJS Assert 完整列表如下: