Download node_modules/fast-check/lib/esm/arbitrary/jsonValue.js from Really-amin/Datasourceforcryptocurrency: direct link, hf CLI and curl.
- Browser
- Download file 654 Bytes
-
https://huggingface.co/spaces/Really-amin/Datasourceforcryptocurrency/resolve/250b128700538234afd94de5d02f4e054f24823e/node_modules/fast-check/lib/esm/arbitrary/jsonValue.js
- Command line
-
hf download hf://spaces/Really-amin/Datasourceforcryptocurrency@250b128700538234afd94de5d02f4e054f24823e/node_modules/fast-check/lib/esm/arbitrary/jsonValue.js
-
curl -L -o jsonValue.js https://huggingface.co/spaces/Really-amin/Datasourceforcryptocurrency/resolve/250b128700538234afd94de5d02f4e054f24823e/node_modules/fast-check/lib/esm/arbitrary/jsonValue.js
654 Bytes
| import { string } from './string.js'; | |
| import { jsonConstraintsBuilder } from './_internals/helpers/JsonConstraintsBuilder.js'; | |
| import { anything } from './anything.js'; | |
| import { fullUnicodeString } from './fullUnicodeString.js'; | |
| export function jsonValue(constraints = {}) { | |
| const noUnicodeString = constraints.noUnicodeString === undefined || constraints.noUnicodeString === true; | |
| const stringArbitrary = 'stringUnit' in constraints | |
| ? string({ unit: constraints.stringUnit }) | |
| : noUnicodeString | |
| ? string() | |
| : fullUnicodeString(); | |
| return anything(jsonConstraintsBuilder(stringArbitrary, constraints)); | |
| } | |