Initial commit
This commit is contained in:
commit
b3a51a4115
10336 changed files with 2381973 additions and 0 deletions
14
node_modules/fast-check/lib/esm/arbitrary/float32Array.js
generated
vendored
Normal file
14
node_modules/fast-check/lib/esm/arbitrary/float32Array.js
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import { float } from './float.js';
|
||||
import { array } from './array.js';
|
||||
import { Float32Array } from '../utils/globals.js';
|
||||
function toTypedMapper(data) {
|
||||
return Float32Array.from(data);
|
||||
}
|
||||
function fromTypedUnmapper(value) {
|
||||
if (!(value instanceof Float32Array))
|
||||
throw new Error('Unexpected type');
|
||||
return [...value];
|
||||
}
|
||||
export function float32Array(constraints = {}) {
|
||||
return array(float(constraints), constraints).map(toTypedMapper, fromTypedUnmapper);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue