(now: Date)
| 2934 | } |
| 2935 | |
| 2936 | function pastedImageTimestamp(now: Date): string { |
| 2937 | const date = [ |
| 2938 | now.getFullYear(), |
| 2939 | padPastedImageDatePart(now.getMonth() + 1), |
| 2940 | padPastedImageDatePart(now.getDate()) |
| 2941 | ].join('-') |
| 2942 | const time = [ |
| 2943 | padPastedImageDatePart(now.getHours()), |
| 2944 | padPastedImageDatePart(now.getMinutes()), |
| 2945 | padPastedImageDatePart(now.getSeconds()) |
| 2946 | ].join('') |
| 2947 | return `${date} ${time}` |
| 2948 | } |
| 2949 | |
| 2950 | function pastedImageExtension(input: Pick<PastedImageInput, 'mimeType' | 'suggestedName'>): string { |
| 2951 | const suggestedExt = path.extname(input.suggestedName ?? '').toLowerCase() |
no test coverage detected