Download node_modules/fast-check/lib/esm/arbitrary/float32Array.js from Really-amin/Datasourceforcryptocurrency: direct link, hf CLI and curl.
- Browser
- Download file 480 Bytes
-
https://huggingface.co/spaces/Really-amin/Datasourceforcryptocurrency/resolve/250b128700538234afd94de5d02f4e054f24823e/node_modules/fast-check/lib/esm/arbitrary/float32Array.js
- Command line
-
hf download hf://spaces/Really-amin/Datasourceforcryptocurrency@250b128700538234afd94de5d02f4e054f24823e/node_modules/fast-check/lib/esm/arbitrary/float32Array.js
-
curl -L -o float32Array.js https://huggingface.co/spaces/Really-amin/Datasourceforcryptocurrency/resolve/250b128700538234afd94de5d02f4e054f24823e/node_modules/fast-check/lib/esm/arbitrary/float32Array.js
480 Bytes
| 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); | |
| } | |