Download wp-calypso/client/data/jetpack-licensing/utils.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 444 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/data/jetpack-licensing/utils.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/data/jetpack-licensing/utils.ts
-
curl -L -o utils.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/data/jetpack-licensing/utils.ts
444 Bytes
| import type { UserLicenseApi, UserLicense } from './types'; | |
| export const mapSingleLicenseApiToLicense = ( license: UserLicenseApi ): UserLicense => ( { | |
| licenseKey: license.license_key, | |
| product: license.product, | |
| productId: license.product_id, | |
| subscriptionId: license.subscription_id, | |
| } ); | |
| export const mapManyLicenseApiToLicense = ( licenses: UserLicenseApi[] ): UserLicense[] => { | |
| return licenses.map( mapSingleLicenseApiToLicense ); | |
| }; | |