0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 23:43:09 +01:00
nodejs/lib/internal/assert.js
Rich Trott ce65034e63
assert: add internal assert.fail()
PR-URL: https://github.com/nodejs/node/pull/26047
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-14 00:00:50 +01:00

16 lines
220 B
JavaScript

'use strict';
function assert(value, message) {
if (!value) {
require('assert')(value, message);
}
}
function fail(message) {
require('assert').fail(message);
}
assert.fail = fail;
module.exports = assert;