Powerful pattern matching for Javascript