UNPKG

rambdax

Version:

Extended version of Rambda - a lightweight, faster alternative to Ramda

8 lines (5 loc) 202 B
export function match(pattern, input){ if (arguments.length === 1) return _input => match(pattern, _input) const willReturn = input.match(pattern) return willReturn === null ? [] : willReturn }