(listEntriesKeys: () => Promise<string[]>)
| 356 | } |
| 357 | |
| 358 | export async function unpublishedEntries(listEntriesKeys: () => Promise<string[]>) { |
| 359 | try { |
| 360 | const keys = await listEntriesKeys(); |
| 361 | return keys; |
| 362 | } catch (error) { |
| 363 | if (error.message === 'Not Found') { |
| 364 | return Promise.resolve([]); |
| 365 | } |
| 366 | throw error; |
| 367 | } |
| 368 | } |
| 369 | |
| 370 | export function blobToFileObj(name: string, blob: Blob) { |
| 371 | const options = name.match(/.svg$/) ? { type: 'image/svg+xml' } : {}; |
no outgoing calls
no test coverage detected