UNPKG

fully-optional

Version:
15 lines (14 loc) 398 B
import curryLast from './curryLast'; import isEmpty from './isEmpty'; var _match = function (value, _a) { var some = _a.some, none = _a.none; return (isEmpty(value) ? none() : some(value)); }; export function match() { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } return curryLast(_match, args); } export default match;