Function to determine the precedence of operators. Unary operators have higher precedence. Binary operators have the same precedence.
Operator to check the precedence.
The precedence of the operator or 0 if the operator is not supported
// Example usage:import { precedence } from "@zk-kit/logical-expressions"const result = precedence("and")console.log(result) // Output: 1 Copy
// Example usage:import { precedence } from "@zk-kit/logical-expressions"const result = precedence("and")console.log(result) // Output: 1
Function to determine the precedence of operators. Unary operators have higher precedence. Binary operators have the same precedence.