Spaces:
Paused
Paused
Download node_modules/@plotly/mapbox-gl/src/util/resolve_tokens.js from Leon4gr45/UserSyncFrontend: direct link, hf CLI and curl.
- Browser
- Download file 505 Bytes
-
https://huggingface.co/spaces/Leon4gr45/UserSyncFrontend/resolve/main/node_modules/%40plotly/mapbox-gl/src/util/resolve_tokens.js
- Command line
-
hf download hf://spaces/Leon4gr45/UserSyncFrontend/node_modules/@plotly/mapbox-gl/src/util/resolve_tokens.js
-
curl -L -o resolve_tokens.js https://huggingface.co/spaces/Leon4gr45/UserSyncFrontend/resolve/main/node_modules/%40plotly/mapbox-gl/src/util/resolve_tokens.js
505 Bytes
| // @flow | |
| export default resolveTokens; | |
| /** | |
| * Replace tokens in a string template with values in an object | |
| * | |
| * @param properties a key/value relationship between tokens and replacements | |
| * @param text the template string | |
| * @returns the template with tokens replaced | |
| * @private | |
| */ | |
| function resolveTokens(properties: {+[string]: mixed}, text: string): string { | |
| return text.replace(/{([^{}]+)}/g, (match, key: string) => { | |
| return key in properties ? String(properties[key]) : ''; | |
| }); | |
| } | |