Download wp-calypso/client/state/all-domains/helpers.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 763 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/all-domains/helpers.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/state/all-domains/helpers.js
-
curl -L -o helpers.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/all-domains/helpers.js
763 Bytes
| import { getDomainType } from 'calypso/lib/domains/utils'; | |
| export const createLightSiteDomainObject = ( domain ) => { | |
| return { | |
| blogId: Number( domain.blog_id ), | |
| domain: String( domain.domain ), | |
| expiry: ! domain.expiry ? null : String( domain.expiry ), | |
| hasRegistration: Boolean( domain.has_registration ), | |
| isWPCOMDomain: Boolean( domain.wpcom_domain ), | |
| isWpcomStagingDomain: Boolean( domain.is_wpcom_staging_domain ), | |
| name: String( domain.domain ), | |
| registrationDate: String( domain.registration_date ), | |
| type: getDomainType( domain ), | |
| siteSlug: String( domain.site_slug ), | |
| siteTitle: String( domain.blog_name ), | |
| isDomainOnlySite: Boolean( domain.is_domain_only_site ), | |
| currentUserIsOwner: Boolean( domain.current_user_is_owner ), | |
| }; | |
| }; | |