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/arbitrary/uuidV.js
generated
vendored
Normal file
10
node_modules/fast-check/lib/esm/arbitrary/uuidV.js
generated
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import { tuple } from './tuple.js';
|
||||
import { buildPaddedNumberArbitrary } from './_internals/builders/PaddedNumberArbitraryBuilder.js';
|
||||
import { paddedEightsToUuidMapper, paddedEightsToUuidUnmapper } from './_internals/mappers/PaddedEightsToUuid.js';
|
||||
export function uuidV(versionNumber) {
|
||||
const padded = buildPaddedNumberArbitrary(0, 0xffffffff);
|
||||
const offsetSecond = versionNumber * 0x10000000;
|
||||
const secondPadded = buildPaddedNumberArbitrary(offsetSecond, offsetSecond + 0x0fffffff);
|
||||
const thirdPadded = buildPaddedNumberArbitrary(0x80000000, 0xbfffffff);
|
||||
return tuple(padded, secondPadded, thirdPadded, padded).map(paddedEightsToUuidMapper, paddedEightsToUuidUnmapper);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue