Spaces:
Configuration error
Configuration error
Download node_modules/escape-string-regexp/index.js from W404NET/Telegram-Chat-Bot: direct link, hf CLI and curl.
- Browser
- Download file 461 Bytes
-
https://huggingface.co/spaces/W404NET/Telegram-Chat-Bot/resolve/main/node_modules/escape-string-regexp/index.js
- Command line
-
hf download hf://spaces/W404NET/Telegram-Chat-Bot/node_modules/escape-string-regexp/index.js
-
curl -L -o index.js https://huggingface.co/spaces/W404NET/Telegram-Chat-Bot/resolve/main/node_modules/escape-string-regexp/index.js
461 Bytes
| ; | |
| module.exports = string => { | |
| if (typeof string !== 'string') { | |
| throw new TypeError('Expected a string'); | |
| } | |
| // Escape characters with special meaning either inside or outside character sets. | |
| // Use a simple backslash escape when it’s always valid, and a \unnnn escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar. | |
| return string | |
| .replace(/[|\\{}()[\]^$+*?.]/g, '\\$&') | |
| .replace(/-/g, '\\x2d'); | |
| }; | |