pattern-matching-replication
v1.0.2
Published
Shitty replication of Pattern Matching proposal: https://github.com/tc39/proposal-pattern-matching
Downloads
7
Readme
sexy ass example
const match = require("pattern-matching-replication");
const wtf = match("femboy discord sex")
.expr(/femboy/, "ew fucking gay")
.expr("uwu", "nya~")
.default("rawr")
.exec();
console.log(wtf) // "ew fucking gay"
functions
match(value) -> create a match
.expr(expression, ifmatch) -> yes
.fall() -> no
.default(ifnomatch) -> default expression
.exec() -> run it