Initial commit
This commit is contained in:
commit
b3a51a4115
10336 changed files with 2381973 additions and 0 deletions
16
node_modules/fast-check/lib/esm/arbitrary/hexa.js
generated
vendored
Normal file
16
node_modules/fast-check/lib/esm/arbitrary/hexa.js
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { buildCharacterArbitrary } from './_internals/builders/CharacterArbitraryBuilder.js';
|
||||
function hexaMapper(v) {
|
||||
return v < 10
|
||||
? v + 48
|
||||
: v + 97 - 10;
|
||||
}
|
||||
function hexaUnmapper(v) {
|
||||
return v < 58
|
||||
? v - 48
|
||||
: v >= 97 && v < 103
|
||||
? v - 97 + 10
|
||||
: -1;
|
||||
}
|
||||
export function hexa() {
|
||||
return buildCharacterArbitrary(0, 15, hexaMapper, hexaUnmapper);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue