Spaces:
Sleeping
Sleeping
Download lib/compare-html-diff.ts from abdullah8844/deepsite: direct link, hf CLI and curl.
- Browser
- Download file 307 Bytes
-
https://huggingface.co/spaces/abdullah8844/deepsite/resolve/main/lib/compare-html-diff.ts
- Command line
-
hf download hf://spaces/abdullah8844/deepsite/lib/compare-html-diff.ts
-
curl -L -o compare-html-diff.ts https://huggingface.co/spaces/abdullah8844/deepsite/resolve/main/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); | |
| }; | |