mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-12-03 19:27:28 +00:00
11 lines
237 B
TypeScript
11 lines
237 B
TypeScript
|
import * as tmp from 'tmp';
|
||
|
|
||
|
export function createTemp(): Promise<[string, any]> {
|
||
|
return new Promise<[string, any]>((res, rej) => {
|
||
|
tmp.file((e, path, fd, cleanup) => {
|
||
|
if (e) return rej(e);
|
||
|
res([path, cleanup]);
|
||
|
});
|
||
|
});
|
||
|
}
|