mirror of
https://github.com/danog/fast-srp.git
synced 2024-11-26 20:04:49 +01:00
Replace function name check with instanceof
so that it works after minification (#2)
This commit is contained in:
parent
0644fb274b
commit
b27158dac0
@ -17,8 +17,8 @@ function assertIsBuffer(arg: Buffer, argname = "arg"): void {
|
||||
assert_(Buffer.isBuffer(arg), `Type error: ${argname} must be a buffer`);
|
||||
}
|
||||
|
||||
function assertIsBigInteger(arg: BigInteger, argname?: string): void {
|
||||
assert_(arg.constructor.name === "BigInteger", `Type error: ${argname} must be a BigInteger`);
|
||||
function assertIsBigInteger(arg: BigInteger, argname = "arg"): void {
|
||||
assert_(arg instanceof BigInteger, `Type error: ${argname} must be a BigInteger`);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user