mirror of https://github.com/codefeathers/fuse
Muthu Kumar
7 years ago
3 changed files with 25 additions and 6 deletions
@ -0,0 +1,16 @@ |
|||
'use strict'; |
|||
|
|||
const Select = (value, resolve) => ({ |
|||
value, |
|||
for: (test, fn) => { |
|||
if (resolve) return { |
|||
...Select(value, resolve), |
|||
resolve |
|||
}; |
|||
if (test) return Select(value, fn); |
|||
return Select(value); |
|||
}, |
|||
resolve: resolve ? resolve : () => undefined |
|||
}); |
|||
|
|||
module.exports = Select; |
Loading…
Reference in new issue