Spaces:
Paused
Paused
Download node_modules/@plotly/mapbox-gl/src/style-spec/validate/validate_string.js from Leon4gr45/UserSyncFrontend: direct link, hf CLI and curl.
- Browser
- Download file 382 Bytes
-
https://huggingface.co/spaces/Leon4gr45/UserSyncFrontend/resolve/main/node_modules/%40plotly/mapbox-gl/src/style-spec/validate/validate_string.js
- Command line
-
hf download hf://spaces/Leon4gr45/UserSyncFrontend/node_modules/@plotly/mapbox-gl/src/style-spec/validate/validate_string.js
-
curl -L -o validate_string.js https://huggingface.co/spaces/Leon4gr45/UserSyncFrontend/resolve/main/node_modules/%40plotly/mapbox-gl/src/style-spec/validate/validate_string.js
382 Bytes
| import getType from '../util/get_type'; | |
| import ValidationError from '../error/validation_error'; | |
| export default function validateString(options) { | |
| const value = options.value; | |
| const key = options.key; | |
| const type = getType(value); | |
| if (type !== 'string') { | |
| return [new ValidationError(key, value, `string expected, ${type} found`)]; | |
| } | |
| return []; | |
| } | |