Initial commit
This commit is contained in:
commit
b3a51a4115
10336 changed files with 2381973 additions and 0 deletions
10
node_modules/fast-check/lib/esm/check/symbols.js
generated
vendored
Normal file
10
node_modules/fast-check/lib/esm/check/symbols.js
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
export const cloneMethod = Symbol.for('fast-check/cloneMethod');
|
||||
export function hasCloneMethod(instance) {
|
||||
return (instance !== null &&
|
||||
(typeof instance === 'object' || typeof instance === 'function') &&
|
||||
cloneMethod in instance &&
|
||||
typeof instance[cloneMethod] === 'function');
|
||||
}
|
||||
export function cloneIfNeeded(instance) {
|
||||
return hasCloneMethod(instance) ? instance[cloneMethod]() : instance;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue