All files / src/utils eitherToPromise.ts

75% Statements 3/4
100% Branches 0/0
66.67% Functions 2/3
100% Lines 2/2
1 2 3 4 5    2x 22x  
import { Either } from "fp-ts/lib/Either";
 
export const eitherToPromise = <L, R>(either: Either<L, R>) =>
  either.fold(l => Promise.reject(l), r => Promise.resolve(r));