mirror of
https://github.com/nodejs/node.git
synced 2025-04-30 23:56:58 +00:00

For use in built-in modules that could benefit from `assert()` without having to load the entire module (unless an AssertionError actually occurs): lib/internal/assert.js. PR-URL: https://github.com/nodejs/node/pull/25956 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
10 lines
136 B
JavaScript
10 lines
136 B
JavaScript
'use strict';
|
|
|
|
function assert(value, message) {
|
|
if (!value) {
|
|
require('assert')(value, message);
|
|
}
|
|
}
|
|
|
|
module.exports = assert;
|