Erster Docker-Stand
This commit is contained in:
16
_node_modules/fast-check/lib/esm/arbitrary/hexa.js
generated
Normal file
16
_node_modules/fast-check/lib/esm/arbitrary/hexa.js
generated
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);
|
||||
}
|
||||
Reference in New Issue
Block a user