-
-
Save victorvoid/c4199695af5eb26357023f74b27508f9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Add(directory, dirWhereSaved){ | |
return fromNullable(directory) | |
.map(() => | |
exist(directory) | |
.and(createATemplate(directory, dirWhereSaved)) | |
.and(cp(directory))) | |
.getOrElse(rejected(`You need to pass the path as a parameter`)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment