Download wp-calypso/client/site-profiler/utils/normalize-whois-entry.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 236 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/site-profiler/utils/normalize-whois-entry.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/site-profiler/utils/normalize-whois-entry.ts
-
curl -L -o normalize-whois-entry.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/site-profiler/utils/normalize-whois-entry.ts
236 Bytes
| // Normalize a whois entry field to a string | |
| export function normalizeWhoisField( field: string | string[] | undefined ): string { | |
| if ( Array.isArray( field ) ) { | |
| return field.length > 0 ? field[ 0 ] : ''; | |
| } | |
| return field ?? ''; | |
| } | |