Datalog.js

(not affiliated with, but using MITRE lightweight Datalog)
Examples (click to overwrite and execute):