Initial commit
This commit is contained in:
commit
b3a51a4115
10336 changed files with 2381973 additions and 0 deletions
26
node_modules/fast-check/lib/arbitrary/_internals/helpers/CustomEqualSet.js
generated
vendored
Normal file
26
node_modules/fast-check/lib/arbitrary/_internals/helpers/CustomEqualSet.js
generated
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CustomEqualSet = void 0;
|
||||
const globals_1 = require("../../../utils/globals");
|
||||
class CustomEqualSet {
|
||||
constructor(isEqual) {
|
||||
this.isEqual = isEqual;
|
||||
this.data = [];
|
||||
}
|
||||
tryAdd(value) {
|
||||
for (let idx = 0; idx !== this.data.length; ++idx) {
|
||||
if (this.isEqual(this.data[idx], value)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
(0, globals_1.safePush)(this.data, value);
|
||||
return true;
|
||||
}
|
||||
size() {
|
||||
return this.data.length;
|
||||
}
|
||||
getData() {
|
||||
return this.data;
|
||||
}
|
||||
}
|
||||
exports.CustomEqualSet = CustomEqualSet;
|
||||
Loading…
Add table
Add a link
Reference in a new issue