Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function MonetEitherT(monad, isRightValue = true) {
if (isUndefined(new.target)) {
if (isNotNull(FlutureTMonetEither) && isFuture(monad)) {
return FlutureTMonetEither.fromFuture(monad);
} else if (monad instanceof Identity.fn.init) {
return Either.of(monad.get());
} else if (monad instanceof Either.fn.init && isNotNull(FlutureTMonetEither)) {
return FlutureTMonetEither.fromEither(monad);
}
return new MonetEitherT(monad);
}
this.run = monad;
this.isRightValue = isRightValue;
}
function MonetEitherT(monad, isRightValue = true) {
if (isUndefined(new.target)) {
if (isNotNull(FlutureTMonetEither) && isFuture(monad)) {
return FlutureTMonetEither.fromFuture(monad);
} else if (monad instanceof Identity.fn.init) {
return Either.of(monad.get());
} else if (monad instanceof Either.fn.init && isNotNull(FlutureTMonetEither)) {
return FlutureTMonetEither.fromEither(monad);
}
return new MonetEitherT(monad);
}
this.run = monad;
this.isRightValue = isRightValue;
}