Skip to content

Commit 8ef4cb8

Browse files
committed
refactor(harden): Relive makeHardener of assert dependency
1 parent 109caaa commit 8ef4cb8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/harden/make-hardener.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,13 @@ import {
5151
FERAL_STACK_SETTER,
5252
isError,
5353
} from './commons.js';
54-
import { assert } from './error/assert.js';
54+
55+
/** @type {(condition: any) => asserts condition} */
56+
const assert = condition => {
57+
if (!condition) {
58+
throw new TypeError('assertion failed');
59+
}
60+
};
5561

5662
/**
5763
* @import {Harden} from '../types.js'

0 commit comments

Comments
 (0)