git: remove denodeify dependency

This commit is contained in:
Joao Moreno
2017-01-26 15:14:52 +01:00
parent 5690a47892
commit 42e938f979
7 changed files with 8 additions and 51 deletions

View File

@@ -88,4 +88,8 @@ export function groupBy<T>(arr: T[], fn: (el: T) => string): { [key: string]: T[
result[key] = [...(result[key] || []), el];
return result;
}, Object.create(null));
}
}
export function denodeify<R>(fn: Function): (...args) => Promise<R> {
return (...args) => new Promise((c, e) => fn(...args, (err, r) => err ? e(err) : c(r)));
}