nodejs - rules engine