z-pattern-matching / z

Pattern Matching for Javascript
https://z-pattern-matching.github.io/
Apache License 2.0
1.72k stars 50 forks source link

Multi-Character global condition match failure #61

Open shadowmouse opened 4 years ago

shadowmouse commented 4 years ago

I'm running into what may be a conceptual issue rather than an actual issue. Are multi-character match variables supported?

E.g.

let string = "test"; match(string)( (s) => { console.log(s); } )

Executes as expected logging

test

but

let string = "test"; match(string)( (str) => { console.log(str); } )

generates no output.