Download wp-calypso/client/lib/domains/get-fixed-domain-search.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 279 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/lib/domains/get-fixed-domain-search.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/lib/domains/get-fixed-domain-search.js
-
curl -L -o get-fixed-domain-search.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/lib/domains/get-fixed-domain-search.js
279 Bytes
| export function getFixedDomainSearch( domainName ) { | |
| const domain = domainName ?? ''; | |
| return domain | |
| .trim() | |
| .toLowerCase() | |
| .replace( /^(https?:\/\/)?(www[0-9]?\.)?/, '' ) | |
| .replace( /^www[0-9]?\./, '' ) | |
| .replace( /[^a-zA-ZÀ-ÖÙ-öù-ÿĀ-žḀ-ỿ0-9-. ]/g, '' ); | |
| } | |