Spaces:
Runtime error
Runtime error
Download lib/compare-html-diff.ts from 1337V/d33psite1337: direct link, hf CLI and curl.
- Browser
- Download file 307 Bytes
-
https://huggingface.co/spaces/1337V/d33psite1337/resolve/085dd5490ebb51ed0c6c3dd3d2330e967b36b44f/lib/compare-html-diff.ts
- Command line
-
hf download hf://spaces/1337V/d33psite1337@085dd5490ebb51ed0c6c3dd3d2330e967b36b44f/lib/compare-html-diff.ts
-
curl -L -o compare-html-diff.ts https://huggingface.co/spaces/1337V/d33psite1337/resolve/085dd5490ebb51ed0c6c3dd3d2330e967b36b44f/lib/compare-html-diff.ts
307 Bytes
| import { defaultHTML } from "./consts"; | |
| export const isTheSameHtml = (currentHtml: string): boolean => { | |
| const normalize = (html: string): string => | |
| html | |
| .replace(/<!--[\s\S]*?-->/g, "") | |
| .replace(/\s+/g, " ") | |
| .trim(); | |
| return normalize(defaultHTML) === normalize(currentHtml); | |
| }; | |