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`
)
)
}
view raw
composability-example07.js
hosted with ❤ by
GitHub