* Refactor download

* emoji type
This commit is contained in:
MeiMei
2019-03-21 04:50:44 +09:00
committed by syuilo
parent 1c79e30436
commit 7bebea087c
12 changed files with 151 additions and 237 deletions

10
src/misc/create-temp.ts Normal file
View File

@ -0,0 +1,10 @@
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]);
});
});
}