Spaces:
Paused
Paused
Download node_modules/@plotly/mapbox-gl/src/style-spec/read_style.js from Leon4gr45/UserSyncFrontend: direct link, hf CLI and curl.
- Browser
- Download file 408 Bytes
-
https://huggingface.co/spaces/Leon4gr45/UserSyncFrontend/resolve/main/node_modules/%40plotly/mapbox-gl/src/style-spec/read_style.js
- Command line
-
hf download hf://spaces/Leon4gr45/UserSyncFrontend/node_modules/@plotly/mapbox-gl/src/style-spec/read_style.js
-
curl -L -o read_style.js https://huggingface.co/spaces/Leon4gr45/UserSyncFrontend/resolve/main/node_modules/%40plotly/mapbox-gl/src/style-spec/read_style.js
408 Bytes
| import ParsingError from './error/parsing_error'; | |
| import jsonlint from '@mapbox/jsonlint-lines-primitives'; | |
| export default function readStyle(style) { | |
| if (style instanceof String || typeof style === 'string' || style instanceof Buffer) { | |
| try { | |
| return jsonlint.parse(style.toString()); | |
| } catch (e) { | |
| throw new ParsingError(e); | |
| } | |
| } | |
| return style; | |
| } | |