Download src/plugin-sdk/allow-from.ts from shimen/shinclaw: direct link, hf CLI and curl.
- Browser
- Download file 356 Bytes
-
https://huggingface.co/spaces/shimen/shinclaw/resolve/main/src/plugin-sdk/allow-from.ts
- Command line
-
hf download hf://spaces/shimen/shinclaw/src/plugin-sdk/allow-from.ts
-
curl -L -o allow-from.ts https://huggingface.co/spaces/shimen/shinclaw/resolve/main/src/plugin-sdk/allow-from.ts
356 Bytes
| export function formatAllowFromLowercase(params: { | |
| allowFrom: Array<string | number>; | |
| stripPrefixRe?: RegExp; | |
| }): string[] { | |
| return params.allowFrom | |
| .map((entry) => String(entry).trim()) | |
| .filter(Boolean) | |
| .map((entry) => (params.stripPrefixRe ? entry.replace(params.stripPrefixRe, "") : entry)) | |
| .map((entry) => entry.toLowerCase()); | |
| } | |