So I need to replace two javascript if statements with ramda, they look like this:
if (!is(String, name)) {
return target[name]
}
if (includes(name, reserved)) {
return target[name]
}
It’s part of a Proxy object, and after these if statements there’s the rest of the code. I tried to do it in Ramda like this:
const target = path('target', 'name')
const isDefault = anyPass([!is(String), includes(reserved)])
return unless(isDefault, target)(name)
But this way the code after return statement is unreachable, unlike with usual if statements, how can I write it in Ramda without returning in place?