Spaces:
Runtime error
Runtime error
Download src/utils/dataUtils.ts from sifars/automated-invoice-processing-agent-backend: direct link, hf CLI and curl.
- Browser
- Download file 296 Bytes
-
https://huggingface.co/spaces/sifars/automated-invoice-processing-agent-backend/resolve/main/src/utils/dataUtils.ts
- Command line
-
hf download hf://spaces/sifars/automated-invoice-processing-agent-backend/src/utils/dataUtils.ts
-
curl -L -o dataUtils.ts https://huggingface.co/spaces/sifars/automated-invoice-processing-agent-backend/resolve/main/src/utils/dataUtils.ts
296 Bytes
| import moment from 'moment'; | |
| export const extractIdAndName = (data: any[]) => { | |
| return data.map(item => ({ id: item.id, name: item.name })); | |
| }; | |
| export const formatDate = (dateString: Date) => { | |
| if (!dateString) return dateString; | |
| return moment(dateString).format('YYYY-MM-DD'); | |
| }; | |