When we want to transform a Promise value we can use the map and flatMap methods. There are also variants to this methods that will only transform a value when a given predicate is true: mapIf and flatMapIf. We provide … Continue reading
The post Ratpacked: Conditionally Map Or Flatmap A Promise appeared first on JDriven.